Need some help with ports and rebuilding the world
Warren Block
wblock at wonkity.com
Wed Mar 30 16:33:23 UTC 2016
On Wed, 30 Mar 2016, Aleksander Alekseev wrote:
>>> CPUTYPE?=native
>>> CFLAGS+=-O2 -pipe
>>> CXXFLAGS+=-O2 -pipe
>
>> These will bite with no provocation, and prevent ports that want to
>> set their own flags from using them.
>
> Frankly as a rule of thumb I prefer binary packages. But how would you
> recommend to change these lines? You see if I use ports I would like
> compiled code to be optimized and preferably for local CPU.
Don't set them at all, just remove those lines from make.conf. Well,
let me be more specific. It is probably safe to set CPUTYPE, although
choosing native has caused problems for me, where specifically setting a
type like core-avx2 has been fine.
It is just the CFLAGS and CXXFLAGS that are best not set. When not set,
the world and kernel build will use safe defaults, but ports that can
safely override those flags for better performance can do so.
More information about the freebsd-current
mailing list