Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 2008 12:44:31 GMT
From:      Robert Woolley <freebsd-pr08@mlists.homeunix.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/122623: bsd.cpu.mk doesn't handle opteron/athlon64/k8 properly for i386
Message-ID:  <200804101244.m3ACiVdp047154@www.freebsd.org>
Resent-Message-ID: <200804101250.m3ACo3vF085749@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         122623
>Category:       i386
>Synopsis:       bsd.cpu.mk doesn't handle opteron/athlon64/k8 properly for i386
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 10 12:50:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Robert Woolley
>Release:        7.0
>Organization:
>Environment:
FreeBSD gumby.homeunix.com 7.0-RELEASE FreeBSD 7.0-RELEASE #11: Sat Mar 29 03:29:48 GMT 2008     root@gumby.homeunix.com:/usr/obj/usr/src/sys/MUSTARD  i386

>Description:
In bsd.cpu.mk the cputypes opteron/athlon64/k8 are treated as aliases for athlon-mp on i386, despite the fact that there is separate handling for these processors'  MACHINE_CPU further down the file, and the types are understood by gcc.

Also k8 is  ommitted where MACHINE_CPU is set for  opteron/athlon64.

>How-To-Repeat:
If you set CPUTYPE=athlon64, athlon-mp is used in the -march option, and  MACHINE_CPU doesn't have sse2.
>Fix:
Patch removes aliases for opteron/athlon64/k8, and adds k8 in the MACHINE_CPU section.

Patch attached with submission follows:

--- ./share/mk/bsd.cpu.mk.orig	2007-10-19 18:08:38.000000000 +0100
+++ ./share/mk/bsd.cpu.mk	2008-03-22 18:30:02.000000000 +0000
@@ -44,9 +44,6 @@
 CPUTYPE = pentium-mmx
 .  elif ${CPUTYPE} == "i586"
 CPUTYPE = pentium
-.  elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || \
-     ${CPUTYPE} == "k8"
-CPUTYPE = athlon-mp
 .  elif ${CPUTYPE} == "k7"
 CPUTYPE = athlon
 .  endif
@@ -116,7 +113,7 @@
 # presence of a CPU feature.
 
 . if ${MACHINE_ARCH} == "i386"
-.  if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64"
+.  if ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8"
 MACHINE_CPU = athlon-xp athlon k7 3dnow sse2 sse mmx k6 k5 i586 i486 i386
 .  elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || \
     ${CPUTYPE} == "athlon-4"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804101244.m3ACiVdp047154>