diff options
author | abs <abs> | 2003-10-02 16:10:00 +0000 |
---|---|---|
committer | abs <abs> | 2003-10-02 16:10:00 +0000 |
commit | a963770e1b77bc366011e9a910618d1de4e64c95 (patch) | |
tree | f603497e969e51bf95c3438771b6d8f51badcab9 /devel/cpuflags | |
parent | 047b27477a5c5ade5f33688eef7bd462b6844c79 (diff) | |
download | pkgsrc-a963770e1b77bc366011e9a910618d1de4e64c95.tar.gz |
Update cpuflags to 0.57:
Add optimisations for specific Athlon models (recht@)
Avoid setting flags if DBG is set to -Os (to reduce size impact
when building contents of distrib on at least 1.6.x i386)
Diffstat (limited to 'devel/cpuflags')
-rw-r--r-- | devel/cpuflags/Makefile | 4 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.NetBSD | 40 | ||||
-rw-r--r-- | devel/cpuflags/files/cpuflags.mk | 6 |
3 files changed, 28 insertions, 22 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile index 50cb926dc54..8216f6b6a39 100644 --- a/devel/cpuflags/Makefile +++ b/devel/cpuflags/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.59 2003/08/07 11:30:04 abs Exp $ +# $NetBSD: Makefile,v 1.60 2003/10/02 16:10:00 abs Exp $ # -DISTNAME= cpuflags-0.56 +DISTNAME= cpuflags-0.57 CATEGORIES= sysutils MASTER_SITES= # empty DISTFILES= # empty diff --git a/devel/cpuflags/files/cpuflags.NetBSD b/devel/cpuflags/files/cpuflags.NetBSD index 163c66951c2..248df1f38ab 100755 --- a/devel/cpuflags/files/cpuflags.NetBSD +++ b/devel/cpuflags/files/cpuflags.NetBSD @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: cpuflags.NetBSD,v 1.41 2003/07/10 11:52:03 abs Exp $ +# $NetBSD: cpuflags.NetBSD,v 1.42 2003/10/02 16:10:00 abs Exp $ if [ -x /sbin/sysctl ] ;then SYSCTL=/sbin/sysctl @@ -59,14 +59,17 @@ case $hw_machine_arch in esac ;; i386) case $hw_model in - *Intel\ Pentium\ II\ *) FLAGS='-march=pentium2' ;; + *Intel\ Pentium\ II\ *) FLAGS='-march=pentium2' ;; *Intel\ Pentium\ III\ *) FLAGS='-march=pentium3' ;; *Intel\ Pentium\ 4\ *) FLAGS='-march=pentium4' ;; *AMD\ K6-III*) FLAGS='-march=k6-3' ;; *AMD\ K6-2*) FLAGS='-march=k6-2' ;; *AMD\ K6*) FLAGS='-march=k6' ;; - *AMD\ K7*|*AMD\ Athlon*) FLAGS='-march=athlon' ;; *AMD\ Duron*) FLAGS='-march=athlon' ;; + *AMD\ K7*|*AMD\ Athlon*^[4XM]*) FLAGS='-march=athlon' ;; + *AMD\ Athlon\ 4*) FLAGS='-march=athlon-4' ;; + *AMD\ Athlon\ MP*) FLAGS='-march=athlon-mp' ;; + *AMD\ Athlon\ XP*) FLAGS='-march=athlon-xp' ;; *386-class*) FLAGS='-march=i386' ;; *486-class*) FLAGS='-march=i486' ;; *586-class*) FLAGS='-march=pentium' ;; @@ -90,7 +93,7 @@ case $hw_machine_arch in case "`egrep '^cpu0 ' /var/run/dmesg.boot`" in *\ MIPS\ R2000\ *) FLAGS="-mcpu=r2000" ;; *\ MIPS\ R3000\ *) FLAGS="-mcpu=r3000" ;; - *\ MIPS\ R3000A\ *) FLAGS="-mcpu=r3000" ;; + *\ MIPS\ R3000A\ *) FLAGS="-mcpu=r3000" ;; *\ Toshiba\ TX3912\ *) FLAGS="-mcpu=r3900" ;; *\ Toshiba\ TX392[27]\ *) FLAGS="-mcpu=r3900" ;; *\ MIPS\ R4000\ *) FLAGS="-mcpu=r4000 -mips2" ;; # really mips3 @@ -106,17 +109,17 @@ case $hw_machine_arch in ;; powerpc) case $hw_model in # Examples - 601\ *) FLAGS='-mcpu=601' ;; # Untested - 602\ *) FLAGS='-mcpu=602' ;; # Untested - 603\ *) FLAGS='-mcpu=603' ;; # Untested + 601\ *) FLAGS='-mcpu=601' ;; # Untested + 602\ *) FLAGS='-mcpu=602' ;; # Untested + 603\ *) FLAGS='-mcpu=603' ;; # Untested 603ev\ *) FLAGS='-mcpu=603e' ;; # PM 4400 - 604\ *) FLAGS='-mcpu=604' ;; # Mac 8500 + 604\ *) FLAGS='-mcpu=604' ;; # Mac 8500 604ev\ *) FLAGS='-mcpu=604e' ;; # upgr B&W G3 - 7450\ *) FLAGS='-mcpu=740' ;; # tibook 550 - 7400\ *) FLAGS='-mcpu=740' ;; # AGP G4/400 Mac - 750\ *) FLAGS='-mcpu=750' ;; # Untested - 740\ *) FLAGS='-mcpu=740' ;; # Untested - 620\ *) FLAGS='-mcpu=620' ;; # Untested + 7450\ *) FLAGS='-mcpu=740' ;; # tibook 550 + 7400\ *) FLAGS='-mcpu=740' ;; # AGP G4/400 Mac + 750\ *) FLAGS='-mcpu=750' ;; # Untested + 740\ *) FLAGS='-mcpu=740' ;; # Untested + 620\ *) FLAGS='-mcpu=620' ;; # Untested esac ;; sparc | sparc64) case " $hw_model" in # Examples @@ -142,11 +145,11 @@ esac if [ -z "$FLAGS" -a -z "$NONE" ] ; then echo 'Unknown machine - please send details to abs@netbsd.org' >&2 - echo " hw.model : '$hw_model'" >&2 - echo " hw.machine : '$hw_machine'" >&2 + echo " hw.model : '$hw_model'" >&2 + echo " hw.machine : '$hw_machine'" >&2 echo " hw.machine_arch : '$hw_machine_arch'" >&2 - echo " cpu details :" >&2 - egrep '^cpu' /var/run/dmesg.boot >&2 + echo " cpu details :" >&2 + egrep '^cpu' /var/run/dmesg.boot >&2 fi # Fixup flags for old gcc @@ -170,6 +173,9 @@ if [ -n "$FLAGS" ]; then 2.90 -mcpu=arm710 -m6 2.95 -march=k6 -march=pentium 3.0 -march=athlon -march=pentiumpro +3.0 -march=athlon-4 -march=pentiumpro +3.0 -march=athlon-mp -march=pentiumpro +3.0 -march=athlon-xp -march=pentiumpro 3.2 -march=k6-2 -march=k6 3.2 -march=k6-3 -march=k6 3.2 -march=pentium2 -march=pentiumpro diff --git a/devel/cpuflags/files/cpuflags.mk b/devel/cpuflags/files/cpuflags.mk index 9413b4f0758..0172cce022d 100644 --- a/devel/cpuflags/files/cpuflags.mk +++ b/devel/cpuflags/files/cpuflags.mk @@ -1,4 +1,4 @@ -# $Id: cpuflags.mk,v 1.10 2003/08/07 11:30:05 abs Exp $ +# $Id: cpuflags.mk,v 1.11 2003/10/02 16:10:00 abs Exp $ # Makefile include fragment to simplify use of cpuflags in pkgsrc # abs@netbsd.org - freely distributable, no warrenties, stick no bills. @@ -30,8 +30,8 @@ CFLAGS+=${CPU_FLAGS} CXXFLAGS+=${CPU_FLAGS} MAKE_FLAGS+=CCOPTIONS="${CPU_FLAGS}" # Override CCOPTIONS for imake -.elif !defined(DBG) || ${DBG} != "-Os" -# Assume in base system and not building distrib optimised for space, set COPTS +.elif !defined(IMAGESIZE) && ${DBG} != "-Os" +# Assume in base system & not building space optimised distrib, set COPTS COPTS?=${CPU_FLAGS} ${DEFCOPTS} # Include ${DEFCOPTS} and set ?= to allow overriding in kernel builds |