Date: Fri, 25 May 2007 09:23:26 -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: <790a9fff0705250723m7515f4fep2fea0e19f438d4e3@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 don't know if this is available for other architectures, haven't > looked to see. > I had a look at the docs, and it doesn't list native as an option to -mtune for the sparc, alpha, ia-64 architectures. The use of -mtune=native on my AMD Turion64 system: CPU: AMD Turion(tm) 64 Mobile Technology ML-37 (1994.21-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x20f42 Stepping =2 Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2> Features2=0x1<SSE3> AMD Features=0xe2500800<SYSCALL,NX,MMX+,FFXSR,LM,3DNow!+,3DNow!> AMD Features2=0x1<LAHF> resulted in gcc setting -mtune to optimize the build for a k8 CPU. $ gcc -v -x c -E -mtune=native /dev/null -o /dev/null Using built-in specs. Target: amd64-undermydesk-freebsd Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 4.2.0 20070514 [FreeBSD] /usr/libexec/cc1 -E -quiet -v -D_LONGLONG /dev/null -o /dev/null -mtune=k8 ignoring duplicate directory "/usr/include" #include "..." search starts here: #include <...> search starts here: /usr/include End of search list. 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?790a9fff0705250723m7515f4fep2fea0e19f438d4e3>