From owner-freebsd-stable Tue Jul 25 18:10:19 2000 Delivered-To: freebsd-stable@freebsd.org Received: from racine.cybercable.fr (racine.cybercable.fr [212.198.0.201]) by hub.freebsd.org (Postfix) with SMTP id 4C27537BC03 for ; Tue, 25 Jul 2000 18:10:08 -0700 (PDT) (envelope-from clefevre@citeweb.net) Received: (qmail 4503775 invoked from network); 26 Jul 2000 01:10:07 -0000 Received: from r227m167.cybercable.tm.fr (HELO gits.dyndns.org) ([195.132.227.167]) (envelope-sender ) by racine.cybercable.fr (qmail-ldap-1.03) with SMTP for ; 26 Jul 2000 01:10:07 -0000 Received: (from root@localhost) by gits.dyndns.org (8.9.3/8.9.3) id DAA46826; Wed, 26 Jul 2000 03:10:05 +0200 (CEST) (envelope-from clefevre@citeweb.net) To: "Jeffrey J. Mountin" Cc: Otter , Dave Boers , stable@FreeBSD.ORG Subject: Re: Recommended compilation optimizations References: <20000724152021.A61713@relativity.student.utwente.nl> <4.3.2.20000725153431.00d66d60@207.227.119.2> X-Face: V|+c;4!|B?E%BE^{E6);aI.[<97Zd*>^#%Y5Cxv;%Y[PT-LW3;A:fRrJ8+^k"e7@+30g0YD0*^^3jgyShN7o?a]C la*Zv'5NA,=963bM%J^o]C Reply-To: Cyrille Lefevre From: Cyrille Lefevre In-Reply-To: "Jeffrey J. Mountin"'s message of "Tue, 25 Jul 2000 16:38:01 -0500" Date: 26 Jul 2000 03:10:05 +0200 Message-ID: Lines: 33 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Canyonlands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Jeffrey J. Mountin" writes: > Throwing flags for fun isn't advised and in most cases the improvements are minimal. After reading the man pages, etc, > some make sense to have (ie -march and -cpu). However, don't recall ever seeing any performance data. OTOH, there can > be significant changes. Then one must decide if the program is used enough to justify the risk. Talking system here, > not ports, which do their own thing in most cases, unless you have CFLAGS set. Most ports will take a -O2, but then you > need to change it back before doing the world. > > Frankly I got tired of switching (and forgetting to) and just stick with '-O -pipe' and hack the ports as > needed/desired. As mentioned it is also faster building world. AFAICR, about 15% faster using '-O -pipe' than '-O2 > -pipe'. in /etc/make.conf, try something like that : IS_SYS?= ${.CURDIR:M*/sys*} IS_SRC?= ${.CURDIR:M*/src*} IS_PORTS?= ${.CURDIR:M*/ports*} .if !empty(IS_SYS) CFLAGS= -O -pipe .endif .if !empty(IS_SRC) CFLAGS= whatever you want .endif .if !empty(IS_PORTS) CFLAGS= -O2 -pipe .endif you see the idea ? I use rules likes them for month w/ any problems. Cyrille. -- home: mailto:clefevre@citeweb.net work: mailto:Cyrille.Lefevre@edf.fr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message