From owner-freebsd-amd64@FreeBSD.ORG Fri May 25 14:48:11 2007 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 495B816A41F for ; Fri, 25 May 2007 14:48:11 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id 475BF13C455 for ; Fri, 25 May 2007 14:48:07 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so257260anc for ; Fri, 25 May 2007 07:48:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Hm6Ol9xHAH1SyWTFd4EtOCk6y8QK5+Ihan3YBxRCOA5AOKp2qHMapvu8p10bOcNcUf7qUoalLn6LuHr0acuUokqEv/mfRYK9M8CyXGqCaEf7AYa3qWFQDIsAmOOfOHn0TcRVJI9/qGAnahNqoE+bg7XD0kNryL7TkdtDhdy5RHI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dzVSM7fpWk61NLzQeIDr8jUxxaJASltbChTRR8dVLR+mNY0cdk+BVZLBnqAhXwdyU0d5i5zykOSjzAhxMbSjuUjwzkUJ8VMXI67EWQ5XtWr8/j0O/Lg6PUP0ziRfO4E5mv5hVyoXPvN5cwOIf4naQ+oxbOZYYZWtiMGivqqaxds= Received: by 10.100.144.11 with SMTP id r11mr2803239and.1180103006508; Fri, 25 May 2007 07:23:26 -0700 (PDT) Received: by 10.100.139.10 with HTTP; Fri, 25 May 2007 07:23:26 -0700 (PDT) Message-ID: <790a9fff0705250723m7515f4fep2fea0e19f438d4e3@mail.gmail.com> Date: Fri, 25 May 2007 09:23:26 -0500 From: "Scot Hetzel" To: "Conrad J. Sabatier" In-Reply-To: <200705250445.l4P4jRp5076893@serene.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <465454CF.3060601@sun-fish.com> <200705250445.l4P4jRp5076893@serene.no-ip.org> Cc: freebsd-amd64@freebsd.org, Stefan Lambrev Subject: Re: CPUTYPE X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 14:48:11 -0000 On 5/24/07, Conrad J. Sabatier 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 Features2=0x1 AMD Features=0xe2500800 AMD Features2=0x1 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.