diff options
author | abs <abs@pkgsrc.org> | 2006-09-15 14:37:32 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2006-09-15 14:37:32 +0000 |
commit | 447db2ffdf144ceda133383f042d4b5538f56cbd (patch) | |
tree | fb609c1a3dbec81e1185006fb857369f25588c87 /devel | |
parent | 1874782916b73a2e64d7393739a6737128969bb3 (diff) | |
download | pkgsrc-447db2ffdf144ceda133383f042d4b5538f56cbd.tar.gz |
Update devel/cpuflags to 1.02
- Linux uses both 'AMD Athlon(TM) XP' and 'AMD Athlon(tm) XP'
- Add at least Opteron recognition to solaris via 'psrinfo -pv'
- Cleanup trailing whitespace
Diffstat (limited to 'devel')
-rw-r--r-- | devel/cpuflags/Makefile | 4 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.Linux | 5 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.NetBSD | 20 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.SunOS | 13 | ||||
-rw-r--r-- | devel/cpuflags/files/cpuflags.mk | 6 |
5 files changed, 28 insertions, 20 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile index fc6d895a7f9..0f3ed77c229 100644 --- a/devel/cpuflags/Makefile +++ b/devel/cpuflags/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.104 2006/06/21 11:15:14 abs Exp $ +# $NetBSD: Makefile,v 1.105 2006/09/15 14:37:32 abs Exp $ # -DISTNAME= cpuflags-1.01 +DISTNAME= cpuflags-1.02 CATEGORIES= sysutils MASTER_SITES= # empty DISTFILES= # empty diff --git a/devel/cpuflags/files/cpuflags.Linux b/devel/cpuflags/files/cpuflags.Linux index 852b1bfb164..22b08870749 100755 --- a/devel/cpuflags/files/cpuflags.Linux +++ b/devel/cpuflags/files/cpuflags.Linux @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: cpuflags.Linux,v 1.19 2005/11/06 15:31:20 abs Exp $ +# $NetBSD: cpuflags.Linux,v 1.20 2006/09/15 14:37:32 abs Exp $ PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH AWK=awk @@ -28,6 +28,7 @@ case $hw_machine_arch in i386) FLAGS='-march=i386' ;; i486) FLAGS='-march=i486' ;; i686) case $hw_model in + "AMD Athlon(TM) XP "*) FLAGS='-march=athlon-xp' ;; "AMD Athlon(tm) XP "*) FLAGS='-march=athlon-xp' ;; "AMD Duron(TM)") FLAGS='-march=athlon' ;; "AMD Duron(tm) ") FLAGS='-march=athlon' ;; @@ -44,7 +45,7 @@ case $hw_machine_arch in case "$hw_flags" in *" sse2 "*) FLAGS='-march=pentium4' ;; - esac + esac esac ;; diff --git a/devel/cpuflags/files/cpuflags.NetBSD b/devel/cpuflags/files/cpuflags.NetBSD index 9204d7631d4..f01d957ab4c 100755 --- a/devel/cpuflags/files/cpuflags.NetBSD +++ b/devel/cpuflags/files/cpuflags.NetBSD @@ -1,16 +1,16 @@ #!/bin/sh -# $NetBSD: cpuflags.NetBSD,v 1.65 2006/06/21 11:15:14 abs Exp $ +# $NetBSD: cpuflags.NetBSD,v 1.66 2006/09/15 14:37:32 abs Exp $ PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH AWK=awk display_hw_details() { - echo " OS : '$(uname)'" - echo " hw.model : '$hw_model'" - echo " hw.machine : '$hw_machine'" + echo " OS : '$(uname)'" + echo " hw.model : '$hw_model'" + echo " hw.machine : '$hw_machine'" echo " hw.machine_arch : '$hw_machine_arch'" - echo " cpu details :" + echo " cpu details :" sed -n -e 's/^/ /' -e '/^ cpu/p' /var/run/dmesg.boot } @@ -84,7 +84,7 @@ case $hw_machine_arch in *AMD\ K7\ \(Athlon\)\ XP\ *) FLAGS='-march=athlon-xp' ;; *AMD\ Athlon\ XP\ *) FLAGS='-march=athlon-xp' ;; *AMD\ K7*|*AMD\ Athlon*) FLAGS='-march=athlon' ;; - *AMD\ Unknown\ K7\ \(Athlon\)*) FLAGS='-march=athlon' ;; + *AMD\ Unknown\ K7\ \(Athlon\)*) FLAGS='-march=athlon' ;; *386-class*) FLAGS='-march=i386' ;; *486-class*) FLAGS='-march=i486' ;; *586-class*) FLAGS='-march=pentium' ;; @@ -99,8 +99,8 @@ case $hw_machine_arch in *\(68060*|*\ MC68060\ *) FLAGS='-m68060' ;; # Upgr amiga 3000 esac case "$(egrep '^fpu0 ' /var/run/dmesg.boot)" in - *\(emulator\)*) FLAGS="$FLAGS -msoft-float" ;; - *\(no\ math\ support\)*) FLAGS="$FLAGS -msoft-float" ;; + *\(emulator\)*) FLAGS="$FLAGS -msoft-float" ;; + *\(no\ math\ support\)*) FLAGS="$FLAGS -msoft-float" ;; esac ;; @@ -113,7 +113,7 @@ case $hw_machine_arch in *\ MIPS\ R2000\ *) FLAGS="-march=r2000" ;; *\ MIPS\ R3000\ *) FLAGS="-march=r3000" ;; *\ MIPS\ R3000A\ *) FLAGS="-march=r3000" ;; - *\ Toshiba\ TX3912\ *) FLAGS="-march=r3900" ;; + *\ Toshiba\ TX3912\ *) FLAGS="-march=r3900" ;; *\ Toshiba\ TX392[27]\ *) FLAGS="-march=r3900" ;; *\ MIPS\ R4000\ *) FLAGS="-mtune=r4000 -mips2" ;; # mips3 *\ MIPS\ R4400\ *) FLAGS="-mtune=r4400 -mips2" ;; # mips3 @@ -140,7 +140,7 @@ case $hw_machine_arch in 7400\ *) FLAGS='-mcpu=7400' ;; # AGP G4/400 Mac 740\ *) FLAGS='-mcpu=740' ;; # Untested 7410\ *) FLAGS='-mcpu=7400' ;; # powerbook g4 - 7447A\ *) FLAGS='-mcpu=7450' ;; # + 7447A\ *) FLAGS='-mcpu=7450' ;; # 7450\ *) FLAGS='-mcpu=7450' ;; # tibook 550 750\ *) FLAGS='-mcpu=750' ;; # Untested diff --git a/devel/cpuflags/files/cpuflags.SunOS b/devel/cpuflags/files/cpuflags.SunOS index 4084de3ee68..04ecdb79638 100755 --- a/devel/cpuflags/files/cpuflags.SunOS +++ b/devel/cpuflags/files/cpuflags.SunOS @@ -1,21 +1,28 @@ #!/bin/sh -# $NetBSD: cpuflags.SunOS,v 1.8 2005/07/22 12:13:12 abs Exp $ +# $NetBSD: cpuflags.SunOS,v 1.9 2006/09/15 14:37:32 abs Exp $ PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH AWK=nawk display_hw_details() { - echo " OS : '`uname`'" - echo " arch : '$hw_arch'" + echo " OS : '`uname`'" + echo " arch : '$hw_arch'" + echo " psrinfo : '$hw_psrinfo'" } hw_arch=`/usr/bin/uname -m` +hw_psrinfo=`psrinfo -pv | $AWK 'NR==3{print}'` # Just gets the first CPU case $hw_arch in sun4c | sun4 ) FLAGS='-mcpu=cypress' ;; sun4m ) FLAGS='-mcpu=supersparc' ;; sun4u ) FLAGS='-mcpu=v9' ;; + i86pc ) + case "$hw_psrinfo" in + *AMD\ Opteron\(tm\)*) FLAGS="-mcpu=opteron" ;; + esac + ;; esac ############ diff --git a/devel/cpuflags/files/cpuflags.mk b/devel/cpuflags/files/cpuflags.mk index 9f12706cce7..15076fa4076 100644 --- a/devel/cpuflags/files/cpuflags.mk +++ b/devel/cpuflags/files/cpuflags.mk @@ -1,4 +1,4 @@ -# $Id: cpuflags.mk,v 1.16 2005/05/01 22:03:37 abs Exp $ +# $Id: cpuflags.mk,v 1.17 2006/09/15 14:37:32 abs Exp $ # Makefile include fragment to simplify use of cpuflags in pkgsrc # abs@absd.org - freely distributable, no warrenties, stick no bills. @@ -12,7 +12,7 @@ # # CPU_DIR CPU_FLAGS with spaces stripped (eg: for use in PACKAGES) -.ifndef CPU_FLAGS +.ifndef CPU_FLAGS . if defined(BSD_PKG_MK) || ${USETOOLS:Uyes} == "no" CPU_FLAGS!=@PREFIX@/bin/cpuflags ${CC} . else @@ -25,7 +25,7 @@ CPU_DIR!=echo ${CPU_FLAGS} | sed 's/ //' .endif .if !defined(MAKEFLAGS) || empty(MAKEFLAGS:MCPU_FLAGS) -MAKEFLAGS+=CPU_FLAGS=${CPU_FLAGS:Q} CPU_DIR=${CPU_DIR:Q} # For sub makes +MAKEFLAGS+=CPU_FLAGS=${CPU_FLAGS:Q} CPU_DIR=${CPU_DIR:Q} # For sub makes .endif .ifdef BSD_PKG_MK # Try to catch various package opts |