Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jun 2002 12:55:08 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Maxime Henrion <mux@freebsd.org>
Cc:        current@FreeBSD.org
Subject:   Re: duplicate -ffreestanding in kernel build
Message-ID:  <3D0B9B9C.DB27DD33@mindspring.com>
References:  <20020615191003.I747-100000@gamplex.bde.org> <3D0B9888.372EAA3E@mindspring.com> <20020615194929.GQ85244@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Maxime Henrion wrote:
> Terry Lambert wrote:
> > What exactly does this do, besides implying "-fno-builtin"?
> >
> > The documentation says "and implies main has no special requirements"...
> >
> > Neither the kernel nor modules have a "main", so the only thing that's
> > relevent here is the "-fno-builtin", right?
> 
> IIRC, -ffreestanding prevented GCC3 from being stupid optimizations like
> changing occurences of printf("constant string\n") to puts("constant
> string"), which failed for kernel builds since we don't have puts() in
> the kernel...

That is an incredibly *fugly* "optimization".  It assumes that I
use libc, unless I have "-ffreestanding", and it assumes my
implementation of printf vs. puts.

It sounds like "-ffreestanding -fbuiltin" should be the default for
everything but the kernel, which should not have "-fbuiltin"...

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D0B9B9C.DB27DD33>