Date: Fri, 25 May 2007 10:30:19 -0500 From: "Scot Hetzel" <swhetzel@gmail.com> To: "Conrad J. Sabatier" <conrads@cox.net> Cc: freebsd-amd64@freebsd.org, Stefan Lambrev <stefan.lambrev@sun-fish.com> Subject: Re: CPUTYPE Message-ID: <790a9fff0705250830x7995dd9u573e53480b6b8952@mail.gmail.com> In-Reply-To: <200705250445.l4P4jRp5076893@serene.no-ip.org> References: <465454CF.3060601@sun-fish.com> <200705250445.l4P4jRp5076893@serene.no-ip.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5/24/07, Conrad J. Sabatier <conrads@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0705250830x7995dd9u573e53480b6b8952>