This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to allow strlen expander to fail
And then spake Clinton Popetz, as follows:
> On Tue, Mar 07, 2000 at 05:20:51PM -0500, Phil Edwards wrote:
> > # `-fhosted'
> > # Assert that compilation takes place in a hosted environment. This
> > # implies `-fbuiltin'. A hosted environment is one in which the
> > # entire standard library is available, and in which `main' has a
> > # return type of `int'. Examples are nearly everything except a
> > # kernel. This is equivalent to `-fno-freestanding'.
> > # `-ffreestanding'
> > # Assert that compilation takes place in a freestanding environment.
> > # This implies `-fno-builtin'. A freestanding environment is one
> > # in which the standard library may not exist, and program startup
> > # may not necessarily be at `main'. The most obvious example is an
> > # OS kernel. This is equivalent to `-fno-hosted'.
Additionally, I had sent in a bug report about -ffreestanding not
affecting gcc's normal behavior of trying to call hosted C-runtime
stuff from main() (__main(), etc) using egcs 1.1.1 targetting mips. I
found this behavior when trying to compile test cases for a MIPS virtual
machine simulator I was writing. I still think this behavior is wrong.
I haven't tested to see whether it exists in the latest snaps, though
from the above discussion I am assuming things haven't changed much...
anyway, if people are going to be hacking on -ffreestanding, it's probably
a good loose end to tie up.
-Brian
--
Brian R. Gaeke, brg@sartre.dgate.ORG -- PGP/GPG gleefully accepted
"the iguana / in the petshop window on St Catherine Street / crested,
royal-eyed, ruling / its kingdom of water-dish and sawdust / dreams of
sawdust" - Margaret Atwood, "Dreams of the Animals"