On Wed, 30 Mar 2016, Aleksander Alekseev wrote:

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.
freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to