This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is a target glibc really needed to build full crossgcc?


Marius Groeger wrote:
Theoretically, possibly, you *could* get away with just the glibc headers. AFAIK there are no target executable binaries generated when providing the c++,objc,... compilers and libraries. However, I know only one way to obtain these glibc headers, and that is to _build_
glibc. :-)


Maybe you could experiment with glibc's configure and Makefile stuff, possibly there even is a "make install-headers", but I doubt it is that easy. Since glibc uses an elaborate directory overlay system to get to the final set of .c and .h files for a specific platform, it is not very easy to extract only the headers as it is with the Linux kernel, for instance.

I did this ages ago. I can't remember what the exact problems were, but I think there was some trouble with the configure tests making wrong decisions/errors due to link failures. Certainly you don't actually need to pull anything in from the libraries.


Sigh, it used to be that you needed glibc headers/libraries for the C++ compiler, but the C compiler would build fine without either (at least for SH), so you had to build the compiler twice with different configs, but it was still simple. Building a compiler and library set from nothing but source has got a lot more complicated since then. Chicken and egg problems are always fun.

Luckily you only need the reproductive tract of the chicken (xgcc, cc1) in order to produce the egg (glibc headers) which can then produce a full (C only) chicken. xgcc and cc1 can be built without headers or libraries given the right make incantations. Don't even try to build C++ without a full glibc (ostrich egg?), it just isn't worth it once you have a C compiler for glibc.

Andrew

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]