Skip site navigation (1)Skip section navigation (2)
Date:      26 Jul 2000 03:10:05 +0200
From:      Cyrille Lefevre <clefevre@citeweb.net>
To:        "Jeffrey J. Mountin" <jeff-ml@mountin.net>
Cc:        Otter <otterr@telocity.com>, Dave Boers <djb@ifa.au.dk>, stable@FreeBSD.ORG
Subject:   Re: Recommended compilation optimizations
Message-ID:  <aef5elxu.fsf@gits.dyndns.org>
In-Reply-To: "Jeffrey J. Mountin"'s message of "Tue, 25 Jul 2000 16:38:01 -0500"
References:  <20000724152021.A61713@relativity.student.utwente.nl> <4.3.2.20000725153431.00d66d60@207.227.119.2>

next in thread | previous in thread | raw e-mail | index | archive | help
"Jeffrey J. Mountin" <jeff-ml@mountin.net> 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




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