|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
bare metal C++Hello,
How do you create a bare metal cross compiler with C++ support? From the reading I have done, it appears that you need newlib for the general C functions and then you need glibc for the C++ stuff. Is this correct? How do you configure glibc to use the newlib stuff and provide the C++ support? Thanks Allen -- For unsubscribe information see http://sourceware.org/lists.html#faq |
|
|
Re: bare metal C++Allen Curtis wrote:
> How do you create a bare metal cross compiler with C++ support? From the > reading I have done, it appears that you need newlib for the general C > functions and then you need glibc for the C++ stuff. Is this correct? No. I use GCC/newlib bare metal and C++ frequently. GLIBC and Newlib have equivalent functionality. Newlib is intended for embedded targets. C++ support is part of GCC. Here's an old script I used for building an powerpc-eabi target. Note that it doesn't show the build for binutils, and there are some hard coded paths for my own convenience ;) ------------ script ----------------------- #!/bin/bash # Note: need to set PATH to point at binutils powerpc-eabi/bin rm -f ../gcc-3.3/newlib ln -s ../../../newlib/1.11.0/newlib-1.11.0/newlib ../gcc-3.3/newlib BINUTILS_PATH=/tools/gnu/gcc/3.3/powerpc-eabi/bin export PATH=$PATH:$BINUTILS_PATH ../gcc-3.3/configure \ --target=powerpc-eabi \ --prefix=/tools/gnu/gcc/3.3/powerpc-eabi \ --with-newlib \ --enable-languages="c c++" make CFLAGS="-O2 -fomit-frame-pointer" > make.temp 2>&1 ----------------------------------------------- -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." "Already Gone" by Jack Tempchin (recorded by The Eagles) The Beatles were wrong: 1 & 1 & 1 is 1 -- For unsubscribe information see http://sourceware.org/lists.html#faq |
|
|
Re: bare metal C++On Nov 3, 2009, at 9:39 AM, Michael N. Moran wrote:
> Allen Curtis wrote: >> How do you create a bare metal cross compiler with C++ support? >> From the reading I have done, it appears that you need newlib for >> the general C functions and then you need glibc for the C++ stuff. >> Is this correct? > > No. I use GCC/newlib bare metal and C++ frequently. GLIBC > and Newlib have equivalent functionality. Newlib is intended > for embedded targets. > > C++ support is part of GCC. > Yes, I have built GCC with c/c++ language support and newlib. What you do not get are the libraries. Where you do get the std:: classes? - Allen -- For unsubscribe information see http://sourceware.org/lists.html#faq |
|
|
Re: bare metal C++Allen Curtis wrote:
> On Nov 3, 2009, at 9:39 AM, Michael N. Moran wrote: > >> Allen Curtis wrote: >>> How do you create a bare metal cross compiler with C++ support? From >>> the reading I have done, it appears that you need newlib for the >>> general C functions and then you need glibc for the C++ stuff. Is >>> this correct? >> >> No. I use GCC/newlib bare metal and C++ frequently. GLIBC >> and Newlib have equivalent functionality. Newlib is intended >> for embedded targets. >> >> C++ support is part of GCC. >> > > Yes, I have built GCC with c/c++ language support and newlib. What you > do not get are the libraries. Where you do get the std:: classes? I don't use the standard C++ libraries <mumbles something about embedded systems and dynamic memory allocation>, but I'm fairly certain that they are built as a part of GCC. -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." "Already Gone" by Jack Tempchin (recorded by The Eagles) The Beatles were wrong: 1 & 1 & 1 is 1 -- For unsubscribe information see http://sourceware.org/lists.html#faq |
|
|
Re: bare metal C++On Nov 3, 2009, at 11:47 AM, Michael N. Moran wrote:
> Allen Curtis wrote: >> On Nov 3, 2009, at 9:39 AM, Michael N. Moran wrote: >>> Allen Curtis wrote: >>>> How do you create a bare metal cross compiler with C++ support? >>>> From the reading I have done, it appears that you need newlib for >>>> the general C functions and then you need glibc for the C++ >>>> stuff. Is this correct? >>> >>> No. I use GCC/newlib bare metal and C++ frequently. GLIBC >>> and Newlib have equivalent functionality. Newlib is intended >>> for embedded targets. >>> >>> C++ support is part of GCC. >>> >> Yes, I have built GCC with c/c++ language support and newlib. What >> you do not get are the libraries. Where you do get the std:: classes? > > I don't use the standard C++ libraries <mumbles something > about embedded systems and dynamic memory allocation>, > but I'm fairly certain that they are built as a part of GCC. > I know this and agree BUT the new C++ compiler seems quite insistent on using String vs. char* in some cases. There must be something else I am missing. -- For unsubscribe information see http://sourceware.org/lists.html#faq |
| Free embeddable forum powered by Nabble | Forum Help |