From owner-freebsd-stable@FreeBSD.ORG Wed Sep 13 09:17:19 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A80D816A416 for ; Wed, 13 Sep 2006 09:17:19 +0000 (UTC) (envelope-from stefan.lambrev@sun-fish.com) Received: from sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F12243D4C for ; Wed, 13 Sep 2006 09:17:18 +0000 (GMT) (envelope-from stefan.lambrev@sun-fish.com) Received: from sun-fish.com (localhost.cmotd.com [127.0.0.1]) by sun-fish.com (Postfix) with ESMTP id 188A8384F5 for ; Wed, 13 Sep 2006 11:17:16 +0200 (CEST) Received: from [192.168.3.112] (boar.cmotd.com [192.168.3.112]) by sun-fish.com (Postfix) with ESMTP id D51F4384F3 for ; Wed, 13 Sep 2006 11:17:15 +0200 (CEST) Message-ID: <4507CC9B.60704@sun-fish.com> Date: Wed, 13 Sep 2006 12:17:15 +0300 From: Stefan Lambrev User-Agent: Thunderbird 1.5.0.5 (X11/20060808) MIME-Version: 1.0 To: freebsd-stable@FreeBSD.ORG References: <200609130905.k8D95idk062789@lurza.secnetix.de> In-Reply-To: <200609130905.k8D95idk062789@lurza.secnetix.de> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-AV-Checked: ClamAV Cc: Subject: Re: optimization levels for 6-STABLE build{kernel,world} X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2006 09:17:19 -0000 Hello, Oliver Fromme wrote: > Marc G. Fournier wrote: > > What are ppl currently using for CFLAGS/COPTFLAGS in /etc/make.conf for > > building kernel/world? I know awhile back it wasn't recommended to go > > above -O2, for instance, but suspect that has changed ... ? > > The best optimization is probably to not override the > defaults at all, because they're already pretty optimal. > In fact, by overriding the defaults there's a good chance > to make things worse. :-) > > 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. > > Best regards > Oliver > > 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 ? -- Best Wishes, Stefan Lambrev ICQ# 24134177