From nobody@FreeBSD.org  Thu Aug 11 14:22:17 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7CD1616A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Aug 2005 14:22:17 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4B42943D48
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Aug 2005 14:22:17 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j7BEMHES085222
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 11 Aug 2005 14:22:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j7BEMGLL085221;
	Thu, 11 Aug 2005 14:22:16 GMT
	(envelope-from nobody)
Message-Id: <200508111422.j7BEMGLL085221@www.freebsd.org>
Date: Thu, 11 Aug 2005 14:22:16 GMT
From: Michael Conlen <meconlen@obfuscated.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: setting CPUTYPE=nocona on an Intel system results in -march=prescott being used
X-Send-Pr-Version: www-2.3

>Number:         84800
>Category:       conf
>Synopsis:       [patch] setting CPUTYPE=nocona on an Intel system results in -march=prescott being used
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 11 14:30:17 GMT 2005
>Closed-Date:    Thu May 31 23:01:22 UTC 2012
>Last-Modified:  Thu May 31 23:01:22 UTC 2012
>Originator:     Michael Conlen
>Release:        5.4-RELEASE-p6
>Organization:
Conlen & Associates Consulting, Inc.
>Environment:
FreeBSD db1 5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6 #0: Wed Aug 10 06:22:56 EDT 2005     root@:/usr/obj/usr/src/sys/DB  i386

>Description:
The file /usr/share/mk/bsd.cpu.mk thinks that a nocona processor is an AMD processor as opposed to Intel and will change the CPUTYPE from nocona to prescott on an Intel Xeon "nocona" system. I've made the change and built world/kernel and many ports including MySQL with nocona. 

      
>How-To-Repeat:
set CPUTYPE=nocona in make.conf on a nocona system and buildworld, watch as it uses -march=prescott
>Fix:
This isn't the best of solutions but it was quick and dirty and it's the one that works. Obviously the whole logic could be reworked but I need to get this box in to production. 


--- bsd.cpu.mk.orig     Thu Aug 11 10:10:24 2005
+++ bsd.cpu.mk  Thu Aug 11 10:10:06 2005
@@ -24,7 +24,7 @@
 
 . if ${MACHINE_ARCH} == "i386"
 .  if ${CPUTYPE} == "nocona"
-CPUTYPE = prescott
+CPUTYPE = nocona
 .  elif ${CPUTYPE} == "p4"
 CPUTYPE = pentium4
 .  elif ${CPUTYPE} == "p4m"
      
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Fri Aug 12 08:30:19 GMT 2005 
Responsible-Changed-Why:  
To David's review. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84800 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Thu May 31 22:55:15 UTC 2012 
State-Changed-Why:  
This is correct. 
Per /usr/src/contrib/gcc/config/i386/driver-i386.c: 
if (has_longmode) 
cpu = "nocona"; 
else 
cpu = "prescott"; 
and /usr/src/contrib/gcc/config/i386/i386.c where the difference 
between "prescott" and "nocona" is the addition of the PTA_64BIT flag 
in the latter. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84800 
>Unformatted:
