CPUTYPE=native handling
Dimitry Andric
dim at FreeBSD.org
Tue Nov 8 07:55:40 UTC 2011
On 2011-11-08 01:25, Alexander Best wrote:
> i've seen dozens of issues, where people set CPUTYPE=native. although this
> works in a lot of cases, it doesn't in others. why don't we simply add
> something like
>
> . if ${CPUTYPE} == "native"
> . error "bla"
> . endif
>
> in share/mk/bsd.cpu.mk for now? or at least for the archs, where "native" is
> known to cause problems.
What does this solve? Don't you think it is better to try to fix the
actual problems? Some people like being able to optimize for their
specific CPU, however much you can shoot yourself in the foot with it.
I haven't seen any consistent bug reports yet, just a lot of complaints
that indicate a rather high probability of PEBKAC.
And just to counter the nay-saying, I compiled a number of boxes with
clang -march=native (mostly of the Xeon/i7 variant) and I haven't seen
any problems at all.
More information about the freebsd-toolchain
mailing list