From owner-freebsd-amd64@FreeBSD.ORG Fri May 25 15:30:25 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 754B716A400 for ; Fri, 25 May 2007 15:30:25 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id BE32613C44B for ; Fri, 25 May 2007 15:30:23 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so266804anc for ; Fri, 25 May 2007 08:30:19 -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=Pct5GsbDDlXI45GgqSGh6bqsAPMt3UIx1lsM8NKCh1GFd+ur58NA7gKUWxvf0ElwHc3KU0OqTrmBl0JeDyEjVlHioqBxkcYkjHxydrJ3Kwe/ERMw5wmnioaeuhU6Mdjv5CRkUAouDvEyM8RjXX8ue8o/GyUnEn5KANMETq314Hk= 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=J7tLjXPcuIn92pi9jokOyyh+GUo1x8JVWYMS7LdziK6dLKB0I0ex4KUO4RVKvEH4C4pCSDswSqxN+ACa1mi2ZOw8PJIvq5qRDxeCEFFSt+ynaC+6oYqCOjZNRZUb13JGFLiev8uhwBaUYoK+9TrdM1gGHiWLhZzvFlaT7ynLrww= Received: by 10.100.191.5 with SMTP id o5mr2835315anf.1180107019335; Fri, 25 May 2007 08:30:19 -0700 (PDT) Received: by 10.100.139.10 with HTTP; Fri, 25 May 2007 08:30:19 -0700 (PDT) Message-ID: <790a9fff0705250830x7995dd9u573e53480b6b8952@mail.gmail.com> Date: Fri, 25 May 2007 10:30:19 -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 15:30:25 -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 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.