From owner-freebsd-current@FreeBSD.ORG Tue Mar 23 03:05:49 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D942E106564A for ; Tue, 23 Mar 2010 03:05:49 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-iw0-f185.google.com (mail-iw0-f185.google.com [209.85.223.185]) by mx1.freebsd.org (Postfix) with ESMTP id A45A88FC14 for ; Tue, 23 Mar 2010 03:05:49 +0000 (UTC) Received: by iwn15 with SMTP id 15so1350099iwn.7 for ; Mon, 22 Mar 2010 20:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=P9ACDzI3EDUenUZJQl8wLhk+FQG39vH7Keiyy+FANqk=; b=NaHuEN4RB3fq6da7/lfsil336xZM61p0TE4Mned0b55s9WCnbFzuEE1hi94zoHNZAU +oyTVUNJw9VGBZqTQdf9EUvMMVOnGaEoDzrGxufLjDXE5oIrz2nz25X5M6cCSTk2BlaQ yif+C4+QPNDG7fdc4XOihKvm5JYFEdLMMwx64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Iu/+UK+tyt4Ewur+oM0+Sr5cVmOsQjiYyc1NPefLKlYOQhiYTSf7rdUD1XXUA9/D9z rlq7SRYNCF+asL+4O3yKv2dHFtfMgQmBKKV8MFoHG4HGXvBdq712VWGIOlw1JIAsmvxA pMvQUHv0aCTWzvCT2xfPc7v91528lrlLZid3w= MIME-Version: 1.0 Received: by 10.231.159.207 with SMTP id k15mr1233928ibx.52.1269313548735; Mon, 22 Mar 2010 20:05:48 -0700 (PDT) Date: Mon, 22 Mar 2010 22:05:48 -0500 Message-ID: <790a9fff1003222005i10dada54u921ba58ed2ea1f7b@mail.gmail.com> From: Scot Hetzel To: freebsd-current Content-Type: text/plain; charset=ISO-8859-1 Subject: MACHINE_CPU not being set correctly when CPUTYPE=native. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2010 03:05:49 -0000 Could someone commit the last patch in PR 112997 to share/mk/bsd.cpu.mk, as it fixes the bug where MACHINE_CPU is not set correctly when CPUTYPE is set to 'native'. On Tue, Aug 28, 2007 at 1:54 AM, Scot Hetzel wrote: > Gcc 4.2 has a new cpu_type (native) for x86 and amd64 systems. This > cpu_type is to allow gcc to automatically detect the processor type > that gcc is running on. > > The problem is that setting CPUTYPE?=native in either src.conf or > make.conf will cause MACHINE_CPU to be set to the wrong value for the > native cpu. > > For example on a system where the processor is a k8, setting CPUTYPE > to k8, shows that MACHINE_CPU is set as follows: > > hp010# make -V MACHINE_CPU -DCPUTYPE=k8 > k8 3dnow amd64 sse2 sse mmx > > But setting CPUTYPE to native on a k8 system sets MACHINE_CPU to this value: > > hp010# make -V MACHINE_CPU -DCPUTYPE=native > unknown amd64 sse2 sse mmx > > After patching share/mk/bsd.cpu.mk (see attachment) or the last patch > to PR 112997: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=112997 > > setting CPUTYPE to native now works correctly when setting the value > for MACHINE_CPU: > > hp010# make -V MACHINE_CPU -V CPUTYPE -DCPUTYPE=native > k8 3dnow amd64 sse2 sse mmx > k8 > > Could this get committed before -CURRENT is branched. > > Thanks, > > Scot