Subject: Re: how to set optimize options for build netbsd ?
To: None <netbsd-users@netbsd.org>
From: haad <haaaad@gmail.com>
List: netbsd-users
Date: 12/09/2005 10:23:47
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pavel Cahyna wrote:
> On Thu, Dec 08, 2005 at 10:05:38PM +0100, haad wrote:
> 
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>Dongsheng Song wrote:
>>
>>>I build netbsd-3 using this command,
>>>
>>>./src/build.sh \
>>>-m i386 -U -u -x \
>>>-X xsrc \
>>>-M /tmp/netbsd-3-branch/i386/obj \
>>>-T /tmp/netbsd-3-branch/i386/tools \
>>>-D /tmp/netbsd-3-branch/i386/dest \
>>>-R /tmp/netbsd-3-branch/i386/200512.rel \
>>>release
>>>
>>>Can I set some optimize options for build netbsd ?
>>>
>>>Thanks for some help
>>>
>>>
>>
>>Hello
>>
>>You can set some optimie options to /etc/mk.conf
>>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??

option CPUFLAGS is not defined in man mk.conf so I added -march to COPTS

- --

There are 10 kinds of people in the world. Those who understand
binary numbers, and those who don't.
		
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDmU0j9Wt2FT7y228RAlODAJ9SHXWr1I6y989gENgZJhDKJbyl4wCgjJmf
8oNxjACLRgh9n1z2Dfr6tKI=
=j7om
-----END PGP SIGNATURE-----