Subject: Re: how to set optimize options for build netbsd ?
To: haad <haaaad@gmail.com>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: netbsd-users
Date: 12/10/2005 11:49:55
On Fri, Dec 09, 2005 at 10:23:47AM +0100, haad wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Pavel Cahyna wrote:
> > On Thu, Dec 08, 2005 at 10:05:38PM +0100, haad wrote:
> >>I have tjis in my /etc/mk.conf
> >>
> >>#for optimizing pkgsrc packages
> >>.ifdef BSD_PKG_MK
> >>COPTS=-O2 -pipe -march=pentium4
> >>OBJHOSTNAME=i686
> >>PKGSRC_LOCKTYPE=once
> >>ACCEPTABLE_LICENSES+=inlineegg-license
> >>ACCEPTABLE_LICENSES+=lame-license
> >>ACCEPTABLE_LICENSES+=skype-license
> >>
> >>#for optimizing other sources
> >>.else
> >>COPTS=-O2 -pipe -march=pentium4
> >
> >
> > COPTS should be appended to, not set, and also I don't think that forcing
> > -O2 is reasonable. Maybe CPUFLAGS is better place to set -march=... ?
> >
> > Pavel Cahyna
> Why is using -O2 optimization not reasonable??
Because, IIRC, the build system already uses -O2 for most files and if
there are exceptions, they exist for some reason.
> option CPUFLAGS is not defined in man mk.conf
True.
> so I added -march to COPTS
You did not, you rather replaced COPTS with -O2 -pipe -march=pentium4 .
Adding would mean COPTS+=-pipe -march=pentium4 .
Pavel