From owner-freebsd-i386@FreeBSD.ORG Thu Apr 10 12:50:03 2008 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D14F1065677 for ; Thu, 10 Apr 2008 12:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4448FC26 for ; Thu, 10 Apr 2008 12:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3ACo3q4085750 for ; Thu, 10 Apr 2008 12:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3ACo3vF085749; Thu, 10 Apr 2008 12:50:03 GMT (envelope-from gnats) Resent-Date: Thu, 10 Apr 2008 12:50:03 GMT Resent-Message-Id: <200804101250.m3ACo3vF085749@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Woolley Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FEC5106564A for ; Thu, 10 Apr 2008 12:44:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 808378FC12 for ; Thu, 10 Apr 2008 12:44:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m3ACiVmW047155 for ; Thu, 10 Apr 2008 12:44:31 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m3ACiVdp047154; Thu, 10 Apr 2008 12:44:31 GMT (envelope-from nobody) Message-Id: <200804101244.m3ACiVdp047154@www.freebsd.org> Date: Thu, 10 Apr 2008 12:44:31 GMT From: Robert Woolley To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: i386/122623: bsd.cpu.mk doesn't handle opteron/athlon64/k8 properly for i386 X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2008 12:50:03 -0000 >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: