cross-builds failing
Jeffrey A Law
law@cygnus.com
Tue Oct 13 19:22:00 GMT 1998
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
More information about the Gcc
mailing list