Re: Need some help with ports and rebuilding the world

From: Warren Block <wblock_at_wonkity.com>
Date: Wed, 30 Mar 2016 10:33:03 -0600 (MDT)
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.
Received on Wed Mar 30 2016 - 14:33:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:03 UTC