How to setup a GCC toolchain?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Problem:
I want to setup a GCC toolchain for a linux box using our own standard C and C++ libraries(licensed from Dinkumware). My goal is to have a free standing GCC which uses only the Dinkumware libraries. I am using the cross-compilation path eventhough i am not actually doing any cross-compilation. I have downloaded the GCC sources onto my linux box and am configuring and building GCC as follows. Note that i am building GCC on my target box itself.
 
I run configure as follows;
../gcc-3.3.2/configure --target=i386-redhat-linux --prefix=/<myhomedir>/gcc --with-headers=/usr/include --with-libs=/<myhomedir>/lib --enable-threads=single
 
Note that i give --with-headers as the target system headers, not the Dinkumware library headers since i don't have platform specific headers(eg. sys/ucontext.h). If i use my headers then GCC doesn't compile. However i give my libraries with the --with-libs option since i don't want the installed ones.
 
I now build and install GCC as;
gmake all-gcc LANGUAGES="c c++"
gmake install-gcc
 
I now delete the headers which were copied over by the configure script(into sys-include) and copy over my library headers. A simple "Hello World" test gives me a lot of unresolved symbols, for example;
 
undefined reference to `__gxx_personality_v0'
undefined reference to `__cxa_begin_catch'
undefined reference to `__cxa_end_catch'
undefined reference to `__cxa_atexit'
undefined reference to `__cxa_call_unexpected'
etc etc
 
It is clear that i am missing some support libraries which are not part of GCC. What are those libraries and where do i get those from? Do i get it from the glibc source?  I want to use our own standard C & C++ library and so do i need to build only portions of glibc?
 
Has somebody done something similar? Am i on the right path? I would appreciate any and all help.
 
Thanks
Ram
 
Ramanathan Ramadass
Sr. Software Engineer,
Performance Analysis - Broadband,
Spirent Communications, 
Voice: 408-752-7310
Fax: 408-752-7186
 
 
 
 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux