optimization levels for 6-STABLE build{kernel,world}

Ruslan Ermilov ru at FreeBSD.ORG
Wed Sep 13 03:21:47 PDT 2006


On Wed, Sep 13, 2006 at 11:26:00AM +0200, Oliver Fromme wrote:
> Stefan Lambrev wrote:
>  > Oliver Fromme wrote:
>  > > The default CFLAGS are "-O2 -pipe -fno-strict-aliasing".
>  > > Anything above -O2 isn't supported, and using -O2 without
>  > > -fno-strict-aliasing also isn't supported (and will create
>  > > broken code for some programs).  A common mistake is to
>  > > specify CFLAGS="-O2 -pipe" and omit -fno-strict-aliasing.
>  > > That'll shot you in the foot sooner or later.
>  > 
>  > May be default flags have to be set here:
>  > /usr/src/share/examples/etc/make.conf ?
>  > I'm asking because in this file I read:
>  > 
>  > # CFLAGS controls the compiler settings used when compiling C code.
>  > # Note that optimization settings other than -O and -O2 are not recommended
>  > # or supported for compiling the world or the kernel - please revert any
>  > # nonstandard optimization settings to "-O" or -O2 before submitting bug
>  > # reports without patches to the developers.
>  > #
>  > #CFLAGS= -O -pipe
>  > 
>  > May be "-fno-strict-aliasing" have to be added here then ?
> 
> Yes, you are right.  I think a clarification should
> be added to the make.conf(5) manual page and to the
> /usr/share/examples/etc/make.conf file.
> 
> Someone care to submit a PR ...?
> 
Should be fixed in src/share/examples/etc/make.conf,v 1.277.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20060913/641bbc8f/attachment.pgp


More information about the freebsd-stable mailing list