CPUTYPE
Scot Hetzel
swhetzel at gmail.com
Fri May 25 15:30:25 UTC 2007
On 5/24/07, Conrad J. Sabatier <conrads at cox.net> wrote:
> Actually, section 3.17.14 in the gcc 4.2.0 docs (Intel 386 and AMD
> x86-64 Options) states that there is now also available a new "native"
> CPU type, which will cause gcc to determine the CPU type of the build
> machine and generate code for the same. No more guesswork needed on
> the part of the user!
>
> I've already tried it here, setting "CPUTYPE=native" in /etc/make.conf,
> and it works fine. Pretty nifty, huh? :-)
>
I found that you DO NOT want to use CPUTYPE=native in /etc/make.conf. CPUTYPE is used to set MACHINE_CPU in share/mk/bsd.cpu.mk.
hp010# cd /usr/src/7x
hp010# make CPUTYPE=native -V MACHINE_CPU
unknown amd64 sse2 sse mmx
hp010# make CPUTYPE= -V MACHINE_CPU
amd64 sse2 sse
hp010# make CPUTYPE=k8 -V MACHINE_CPU
k8 3dnow amd64 sse2 sse mmx
hp010# make CPUTYPE=nocona -V MACHINE_CPU
sse3 amd64 sse2 sse mmx
Instead use:
gcc -v -x c -E -mtune=native /dev/null -o /dev/null 2>&1 | grep mtune | sed -e -e 's/.*mtune=//'
to determine what to set CPUTYPE to for your system.
Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.
More information about the freebsd-amd64
mailing list