From owner-freebsd-current Sat Jun 15 12:56: 2 2002 Delivered-To: freebsd-current@freebsd.org Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id 9203B37B42B; Sat, 15 Jun 2002 12:55:46 -0700 (PDT) Received: from pool0289.cvx22-bradley.dialup.earthlink.net ([209.179.199.34] helo=mindspring.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #2) id 17JJeD-0000BJ-00; Sat, 15 Jun 2002 12:55:46 -0700 Message-ID: <3D0B9B9C.DB27DD33@mindspring.com> Date: Sat, 15 Jun 2002 12:55:08 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Maxime Henrion Cc: current@FreeBSD.org Subject: Re: duplicate -ffreestanding in kernel build References: <20020615191003.I747-100000@gamplex.bde.org> <3D0B9888.372EAA3E@mindspring.com> <20020615194929.GQ85244@elvis.mu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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