inhibit_libc definition patch

Chris G. Demetriou cgd@sibyte.com
Fri Apr 28 14:32:00 GMT 2000


Thanks for your quick response, Geoff!

BTW, in my original message, I pasted one of the URLs wrong:

I wrote:
> (I have seen other people
> suggesting interesting patches relating to inhibit_libc, e.g.,
> http://gcc.gnu.org/ml/gcc/1999-06n/msg00729.html , but as far as I can
> tell from the list archives and the state of the current sources,
> these haven't had much impact either.

but i meant the URL:

	http://gcc.gnu.org/ml/gcc-patches/2000-03/msg01033.html


Geoff Keating <geoffk@cygnus.com> writes:
> The Right Thing is that
> 
> (a) you provide headers using the --with-headers= configure option; and
> (b) only if someone doesn't do this should inhibit_libc be defined,
>     in which case it should be defined for all target files.

OK, this makes sense.  (In this case, what's wrong with the patch in
at http://gcc.gnu.org/ml/gcc-patches/2000-03/msg01033.html ?  Is it
this it's still defining inhibit_libc when configured with
--enable-newlib?  I don't think i get the use of [] in the new entry
in configure.in in that patch, but the resulting configure script
comes out right.)

If there are specific problems with that patch, I'll be glad to fix
them and submit an improved version.


> I expect that at some point in the future, trying to build gcc without
> the target system's headers will simply not work.

This is, of course, already the case for the 'add-on' component
libraries.  However, in my opinion, if the basic GCC + libgcc required
target headers, that would be very unfortunate.

If you are, for instance, building self-contained ROM firmware or
operating system kernels, which want libgcc but which have no need for
the 'normal' system headers or libraries, you're then out of luck.

Also, over the last year, bootstrapping a cross-compiler from nothing
using linux/glibc as the environment, i found it awfully hard to get
glibc to install its headers without doing a full build/install.  (I
think that's broken, and maybe i was just doing something wrong... but
starting with a gcc compiled without any target headers was the only
way i could figure out of getting it to work!)



chris


More information about the Gcc-patches mailing list