GCC-2.95.1: removing depencies to std headers ?

Philippe GIACINTI Philippe.GiacintiATsxb.bsf.alcatel.fr
Fri Sep 17 01:17:00 GMT 1999


Hi,

I'm very brand new to the list, and I know that my question is probably a FAQ,
but I didn't find an answer in the archive.

I have made a cross GCC-2.95.1 from Solaris2.6 to Linux and went to a problem
whith references to "stlib.h" & "unistd.h" (that's the FAQ).
Anyway I found in code of files "libgcc2.c" & "frame.c" that these dependencies
may be removed when the flag "inhibit_libc" is set, and that these includes are
not needed to compile the previous files.
So I've set the flag and could generate a cross-compiler without having the
Linux standard libraries.

So my questions are: 
   - What kind of problem may I have if I use this "hacked" cross-compiler ?
   - Why are the standard headers included when they are not used ?
   - Why is the compiler (which is supposed to only generate "machine" code)
     dependant on the standard C library ?

Thanks in advance for your answers.
Best regards.

-- 
Philippe Giacinti - Alcatel Business Systems - PCD/SME/SWPCC - CC 645
1, route du Dr Albert Schweitzer - 67408 Illkirch Cedex - FRANCE
Tel: +33 (0)3.88.67.62.10 - Fax: +33 (0)3.88.67.77.93
mailto:Philippe.Giacinti@sxb.bsf.alcatel.fr


More information about the Gcc-help mailing list