Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2006 11:26:00 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: optimization levels for 6-STABLE build{kernel,world}
Message-ID:  <200609130926.k8D9Q0XZ063753@lurza.secnetix.de>
In-Reply-To: <4507CC9B.60704@sun-fish.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 ...?

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"With sufficient thrust, pigs fly just fine.  However, this
is not necessarily a good idea.  It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925



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