egcs needs a system.h?
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Thu Feb 12 18:02:00 GMT 1998
> From: hjl@lucon.org (H.J. Lu)
>
> > System.h is strictly a host machine issue. Ie, just like
> > putting #ifdef HAVE_STDLIB_H in a source file. It just consolidates
> > these into one file so we don't have to repeat it 200 times.
> >
>
> That is not true if host != build. Give it a try and you will see
> what I meant. It is kind of tricky.
>
> > So I'm not sure what target or build machine issues arise.
>
> Some files in gcc are compiled for the build machine. But most
> of time, build == host. Basically "hconfig.h" should contain the
> build machine stuff. The name of hconfig.h is misleading. It should
> be renamed to bconfig.h. I had to deal with it when I first built
> gcc binaries running on linux/x86 for linux/x86 under Ultrix.
>
> H.J.
Sorry to be so thick :-), but I still don't see the problem.
Would you please help me understand without having me go off and try a
build != host cross build?
Eg, currently calls.c in the top level directory includes <stdio.h>.
If I instead have calls.c include "system.h" and system.h includes
<stdio.h> there is no difference in the end result, right?
And if all these includes are in one file, when you come up
with a solution to your build != host problem (whatever it is), you
only have to fix it in one file. So isn't this a step in the right
direction?
--Kaveh
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu ICon CMT Corp.
More information about the Gcc
mailing list