From owner-freebsd-stable@FreeBSD.ORG Wed Sep 13 09:06:15 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 601BB16A4ED for ; Wed, 13 Sep 2006 09:06:15 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id F221A43DEB for ; Wed, 13 Sep 2006 09:05:50 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (ividqf@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k8D95ipZ062790 for ; Wed, 13 Sep 2006 11:05:49 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k8D95idk062789; Wed, 13 Sep 2006 11:05:44 +0200 (CEST) (envelope-from olli) Date: Wed, 13 Sep 2006 11:05:44 +0200 (CEST) Message-Id: <200609130905.k8D95idk062789@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG In-Reply-To: <20060912161603.R1031@ganymede.hub.org> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 13 Sep 2006 11:05:50 +0200 (CEST) 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 Reply-To: freebsd-stable@FreeBSD.ORG 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:06:15 -0000 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 -- 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. 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.'