This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cross-builds failing
- To: richard dot earnshaw at arm dot com
- Subject: Re: cross-builds failing
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 13 Oct 1998 12:58:42 -0600
- cc: egcs at cygnus dot com, rearnsha at sun52 dot arm dot com
- Reply-To: law at cygnus dot com
In message <199810131447.PAA17838@sun52.NIS.cambridge>you write:
> Any particular reason? (Other than finding the correct include files is
> problematical).
None other than finding the right include files. Part of the problem is
newlib has include files scattered all over the newlib sources.
> > Either something is including stdio and unistd unconditionally, or inhibi
> t_libc
> > is not being defined.
>
> It isn't defined until about 10 lines later in the file.
It should have been defined on the command line. See LIBGCC2_CFLAGS or
whatever it is.
> Ah! The arm ports are overriding LIBGCC2_CFLAGS. I guess this was
> probably done before TARGET_LIBGCC2_CFLAGS was added and never fixed up.
Ah. Yes. I think TARGET_LIBGCC2_CFLAGS may have been invented for this
exact reason!
> PS. It has always struck me as somewhat odd that gcc, which is supposedly
> an ANSI/ISO C compiler needs a Posix header file (unistd.h) and associated
> functions in order to compile its support library.
Yes, it's hokey.
Much of the braindamage can be traced back to assert.h, which gcc provides
for reasons I never understood. A few other things have been added through
the years which want to use stdio.h (gcov & eh support), but at the heart
of the problem was the assert.h support code.
jeff