bug-glibc
[Top][All Lists]
Advanced

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

How to setup a Linux GCC toolchain WITHOUT glibc but with my own std lib


From: Ramadass, Ramanathan
Subject: How to setup a Linux GCC toolchain WITHOUT glibc but with my own std libraries?
Date: Fri, 24 Oct 2003 11:09:56 -0700

Hi,

I had sent this originally to the "address@hidden" mailing list, but a little 
browsing of the glibc source showed me some of my unresolved symbols and hence 
i am sending this to the GLIBC mailing list. Would appreciate it if somebody 
can point me as to how to get the gcc specific portions from glibc and use it 
with my 3rd party libraries?

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
 
 
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]