Wed Mar 4 00:32:44 2009 UTC ()
Updated devel/cpuflags to 1.39

- Add "Intel(r) Xeon(r) CPU           E5430" and strip leading whitespace from
  Solaris psrinfo output - from Jim Wise
- Add "Intel(R) Xeon(R) CPU           E5310" - from Felix Resch
- Add "Genuine Intel(R) CPU           T2500" - from Daniel Carosone


(abs)
diff -r1.144 -r1.145 pkgsrc/devel/cpuflags/Makefile
diff -r1.4 -r1.5 pkgsrc/devel/cpuflags/files/subr_SunOS
diff -r1.11 -r1.12 pkgsrc/devel/cpuflags/files/subr_x86

cvs diff -r1.144 -r1.145 pkgsrc/devel/cpuflags/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/cpuflags/Makefile 2009/02/02 17:09:46 1.144
+++ pkgsrc/devel/cpuflags/Makefile 2009/03/04 00:32:44 1.145
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.144 2009/02/02 17:09:46 abs Exp $ 1# $NetBSD: Makefile,v 1.145 2009/03/04 00:32:44 abs Exp $
2 2
3DISTNAME= cpuflags-1.38 3DISTNAME= cpuflags-1.39
4CATEGORIES= devel sysutils 4CATEGORIES= devel sysutils
5MASTER_SITES= # empty 5MASTER_SITES= # empty
6DISTFILES= # empty 6DISTFILES= # empty
7 7
8MAINTAINER= abs@NetBSD.org 8MAINTAINER= abs@NetBSD.org
9COMMENT= Determine compiler flags to best target current cpu 9COMMENT= Determine compiler flags to best target current cpu
10 10
11PKG_DESTDIR_SUPPORT= user-destdir 11PKG_DESTDIR_SUPPORT= user-destdir
12 12
13ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-* SunOS-*-* FreeBSD-*-* 13ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-* SunOS-*-* FreeBSD-*-*
14 14
15USE_LANGUAGES= # empty 15USE_LANGUAGES= # empty
16NO_CHECKSUM= yes 16NO_CHECKSUM= yes

cvs diff -r1.4 -r1.5 pkgsrc/devel/cpuflags/files/subr_SunOS (expand / switch to unified diff)

--- pkgsrc/devel/cpuflags/files/subr_SunOS 2009/01/28 23:30:50 1.4
+++ pkgsrc/devel/cpuflags/files/subr_SunOS 2009/03/04 00:32:44 1.5
@@ -1,31 +1,32 @@ @@ -1,31 +1,32 @@
1# $NetBSD: subr_SunOS,v 1.4 2009/01/28 23:30:50 abs Exp $ 1# $NetBSD: subr_SunOS,v 1.5 2009/03/04 00:32:44 abs Exp $
2 2
3AWK=nawk 3AWK=nawk
4SED=sed 4SED=sed
5 5
6display_hw_details() 6display_hw_details()
7 { 7 {
8 cat <<END 8 cat <<END
9OS : '$(uname)' 9OS : '$(uname)'
10arch : '$hw_arch' 10arch : '$hw_arch'
11psrinfo : '$hw_psrinfo' 11psrinfo : '$hw_psrinfo'
12END 12END
13 } 13 }
14 14
15extract_hw_details() 15extract_hw_details()
16 { 16 {
17 hw_arch=$(/usr/bin/uname -m) 17 hw_arch=$(/usr/bin/uname -m)
18 hw_psrinfo=$(psrinfo -pv | $AWK 'NR==3{print}') # Just gets the first CPU 18 # Just gets the first CPU
 19 hw_psrinfo=$(psrinfo -pv | $AWK 'NR==3{sub(" *","");print}')
19 } 20 }
20 21
21determine_arch() 22determine_arch()
22 { 23 {
23 ARCH= 24 ARCH=
24 case $hw_arch in 25 case $hw_arch in
25 sun4c | sun4 ) ARCH='-mcpu=cypress' ;; 26 sun4c | sun4 ) ARCH='-mcpu=cypress' ;;
26 sun4m ) ARCH='-mcpu=supersparc' ;; 27 sun4m ) ARCH='-mcpu=supersparc' ;;
27 sun4u ) ARCH='-mcpu=v9' ;; 28 sun4u ) ARCH='-mcpu=v9' ;;
28 i86pc ) 29 i86pc )
29 include subr_x86 # this provides map_x86_brand_string() 30 include subr_x86 # this provides map_x86_brand_string()
30 ARCH=$(map_x86_brand_string "$cpu_brand") 31 ARCH=$(map_x86_brand_string "$cpu_brand")
31 if [ -z "$ARCH" ] ; then 32 if [ -z "$ARCH" ] ; then

cvs diff -r1.11 -r1.12 pkgsrc/devel/cpuflags/files/subr_x86 (expand / switch to unified diff)

--- pkgsrc/devel/cpuflags/files/subr_x86 2009/02/02 17:09:46 1.11
+++ pkgsrc/devel/cpuflags/files/subr_x86 2009/03/04 00:32:44 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: subr_x86,v 1.11 2009/02/02 17:09:46 abs Exp $ 1# $NetBSD: subr_x86,v 1.12 2009/03/04 00:32:44 abs Exp $
2 2
3# Apparently the only way to reliably determine the architecture of a recent 3# Apparently the only way to reliably determine the architecture of a recent
4# Intel CPU is to use the cpu brand string - as they reused family and 4# Intel CPU is to use the cpu brand string - as they reused family and
5# extended family bitflags... annoying 5# extended family bitflags... annoying
6# Even better, they appear to have reused brand strings between Northwood 6# Even better, they appear to have reused brand strings between Northwood
7# and Prescott pentium4s. Thats just... special. 7# and Prescott pentium4s. Thats just... special.
8 8
9# AMD, in contrast decided to keep things simple: 9# AMD, in contrast decided to keep things simple:
10# (thanks to Christoph Egger for this list) 10# (thanks to Christoph Egger for this list)
11# Family 0x6: AMD K7 11# Family 0x6: AMD K7
12# Family 0xf: AMD K8 12# Family 0xf: AMD K8
13# Family 0x10: AMD Barcelona/Phenom 13# Family 0x10: AMD Barcelona/Phenom
14# Family 0x11: AMD Turion Ultra 14# Family 0x11: AMD Turion Ultra
@@ -19,42 +19,45 @@ map_x86_brand_string() @@ -19,42 +19,45 @@ map_x86_brand_string()
19 "AMD*") 19 "AMD*")
20 case "$cpu_family-$cpu_model" in 20 case "$cpu_family-$cpu_model" in
21 5-6 | 5-7 ) echo '-march=k6' ;; 21 5-6 | 5-7 ) echo '-march=k6' ;;
22 5-8 ) echo '-march=k6-2' ;; 22 5-8 ) echo '-march=k6-2' ;;
23 5-9 ) echo '-march=k6-3' ;; 23 5-9 ) echo '-march=k6-3' ;;
24 6-1 | 6-2 | 6-3 ) echo '-march=athlon' ;; 24 6-1 | 6-2 | 6-3 ) echo '-march=athlon' ;;
25 6-4 | 6-6 | 6-7 | 6-8 | 6-a ) echo '-march=athlon-4' ;; 25 6-4 | 6-6 | 6-7 | 6-8 | 6-a ) echo '-march=athlon-4' ;;
26 esac 26 esac
27 ;; 27 ;;
28 28
29 "VIA Nehemiah"*) echo '-march=c3' ;; 29 "VIA Nehemiah"*) echo '-march=c3' ;;
30 30
31 "Genuine Intel(R) CPU T2400"*) echo '-march=core2' ;; 31 "Genuine Intel(R) CPU T2400"*) echo '-march=core2' ;;
 32 "Genuine Intel(R) CPU T2500"*) echo '-march=core2' ;;
32 "Intel(R) Atom(TM) CPU N270 "*) echo '-march=prescott' ;;#So far 33 "Intel(R) Atom(TM) CPU N270 "*) echo '-march=prescott' ;;#So far
33 "Intel(R) Celeron(R) CPU E1400"*) echo '-march=core2' ;; 34 "Intel(R) Celeron(R) CPU E1400"*) echo '-march=core2' ;;
34 "Intel(R) Celeron(R) CPU 2.40GHz") echo '-march=pentium4' ;; 35 "Intel(R) Celeron(R) CPU 2.40GHz") echo '-march=pentium4' ;;
35 "Intel(R) Celeron(R) M processor "*) echo '-march=pentium-m' ;; 36 "Intel(R) Celeron(R) M processor "*) echo '-march=pentium-m' ;;
36 "Intel(R) Celeron(TM) CPU 1400MHz") echo '-march=pentium3' ;; 37 "Intel(R) Celeron(TM) CPU 1400MHz") echo '-march=pentium3' ;;
37 "Intel(R) Core(TM)2 "*) echo '-march=core2' ;; 
38 "Intel(R) Core 2 "*) echo '-march=core2' ;; 38 "Intel(R) Core 2 "*) echo '-march=core2' ;;
 39 "Intel(R) Core(TM)2 "*) echo '-march=core2' ;;
39 "Intel(R) Pentium(R) 4 CPU"*) 40 "Intel(R) Pentium(R) 4 CPU"*)
40 if [ -n "$cpu_feature_SSE3" ] ; then 41 if [ -n "$cpu_feature_SSE3" ] ; then
41 echo '-march=prescott' 42 echo '-march=prescott'
42 else 43 else
43 echo '-march=pentium4' 44 echo '-march=pentium4'
44 fi ;; 45 fi ;;
45 "Intel(R) Pentium(R) M processor "*) echo '-march=pentium-m' ;; 46 "Intel(R) Pentium(R) M processor "*) echo '-march=pentium-m' ;;
46 "Intel(R) Xeon(R) CPU 3040"*) echo '-march=core2' ;; 47 "Intel(R) Xeon(R) CPU 3040"*) echo '-march=core2' ;;
47 "Intel(R) Xeon(R) CPU 3050"*) echo '-march=core2' ;; 48 "Intel(R) Xeon(R) CPU 3050"*) echo '-march=core2' ;;
 49 "Intel(R) Xeon(R) CPU E5310"*) echo '-march=core2' ;;
 50 "Intel(r) Xeon(r) CPU E5430"*) echo '-march=core2' ;;
48 "Pentium(R) Dual-Core CPU E5200"*) echo '-march=core2' ;; 51 "Pentium(R) Dual-Core CPU E5200"*) echo '-march=core2' ;;
49 52
50 esac 53 esac
51 } 54 }
52 55
53flags_fixup_x86arch() 56flags_fixup_x86arch()
54 { 57 {
55 arch=$1 58 arch=$1
56 features=$2 59 features=$2
57 # Fixup ARCH for x86 60 # Fixup ARCH for x86
58 # 61 #
59 # The format of table is 62 # The format of table is
60 # feature:lowend_arch:fix_arch 63 # feature:lowend_arch:fix_arch