This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Configuring for bare hw ia32 PC's


duane> If you look at the makefile - it builds GCC in 2 stages stage 1 - is
duane> just a straight up C compiler, nothing else. No standard library. That
duane> should be enough to build your kernel as I describe.


jonathan> I gree, though I recommend building the kernel with the second
jonathan> round gcc. [snip]

[snip]

jonathan> Yes. But having done that, don't try to use stage1 GCC to build your
jonathan> kernel. Use stage2 GCC for everything, if only to reduce the number of
jonathan> variants of tools that can hurt you.


Wait - hold on for a second.

The stage1 GCC has *zero* header files, and only 'libgcc'.

White lie: GCC supplied <limits.h> and <stddef.h>  are present
(look in the 'lib' directory)

The benefit here is there is no accidental #include of a user space header file. Yes, you can do the same with "--nostdinc" and other
command line hackery :-(


It really depends on your needs, fears, etc. Perhaps my fear is over blow - why? Because linux x86 builds with "gcc" - the default compiler
and uses the "--nostdinc" trick.


BTW - you might also want to check out the -fnobuiltin options.

-Duane.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]