public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to setup a GCC toolchain?
@ 2003-10-24 17:24 Ramadass, Ramanathan
  0 siblings, 0 replies; only message in thread
From: Ramadass, Ramanathan @ 2003-10-24 17:24 UTC (permalink / raw)
  To: gcc-help

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
 
 
 
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-24 17:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-24 17:24 How to setup a GCC toolchain? Ramadass, Ramanathan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).