summaryrefslogtreecommitdiff
path: root/devel/cpuflags
diff options
context:
space:
mode:
authorabs <abs>2004-12-22 15:12:18 +0000
committerabs <abs>2004-12-22 15:12:18 +0000
commit92a9c355bde2aa59a5e2cef73db0864f1f29e9af (patch)
treed0400c3bcf3afffcf7b6176196ce08b1d21fdc31 /devel/cpuflags
parent5776607b66360b319b2892081a4432cc3a1126a4 (diff)
downloadpkgsrc-92a9c355bde2aa59a5e2cef73db0864f1f29e9af.tar.gz
Update cpuflags to 0.79:
- Shuffle the various cpuflags.<OS> to group more common lines - Use nawk on solaris [Jonathan A. Kollasch PR pkg/26572] - Add Linux 'Intel(R) Pentium(R) 4 CPU' - Add NetBSD/i386 'AMD Athlon Model 4 (Thunderbird)' [Rob Quinn] - Add NetBSD/macppc 604e [John Klos] - Add NetBSD/chocolate [Al]
Diffstat (limited to 'devel/cpuflags')
-rw-r--r--devel/cpuflags/Makefile4
-rwxr-xr-xdevel/cpuflags/files/cpuflags.Linux29
-rwxr-xr-xdevel/cpuflags/files/cpuflags.NetBSD28
-rwxr-xr-xdevel/cpuflags/files/cpuflags.SunOS24
4 files changed, 47 insertions, 38 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile
index f02688a4d17..2bb86039ea0 100644
--- a/devel/cpuflags/Makefile
+++ b/devel/cpuflags/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.81 2004/11/14 21:51:05 abs Exp $
+# $NetBSD: Makefile,v 1.82 2004/12/22 15:12:18 abs Exp $
#
-DISTNAME= cpuflags-0.78
+DISTNAME= cpuflags-0.79
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/devel/cpuflags/files/cpuflags.Linux b/devel/cpuflags/files/cpuflags.Linux
index 9521e6c32a8..29b03716eab 100755
--- a/devel/cpuflags/files/cpuflags.Linux
+++ b/devel/cpuflags/files/cpuflags.Linux
@@ -1,16 +1,8 @@
#!/bin/sh
-# $NetBSD: cpuflags.Linux,v 1.11 2004/11/14 21:51:05 abs Exp $
+# $NetBSD: cpuflags.Linux,v 1.12 2004/12/22 15:12:18 abs Exp $
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
-if [ "$1" = -v ] ; then
- shift
- opt_v=1
-fi
-if [ -n "$1" ]; then
- CC=$1
-else
- CC=gcc
-fi
+AWK=awk
display_hw_details()
{
@@ -25,8 +17,8 @@ if [ ! -f /proc/cpuinfo ] ; then
echo "Unable to open /proc/cpuinfo"
hw_model=Unknown
else
- hw_model=$(awk -F: '/^model name/{sub(" ","",$2);print $2;exit}' /proc/cpuinfo)
- hw_flags=$(awk -F: '/^flags/{sub(" ","",$2);print $2;exit}' /proc/cpuinfo)
+ hw_model=$($AWK -F: '/^model name/{sub(" ","",$2);print $2;exit}' /proc/cpuinfo)
+ hw_flags=$($AWK -F: '/^flags/{sub(" ","",$2);print $2;exit}' /proc/cpuinfo)
fi
case $hw_machine_arch in
@@ -40,6 +32,7 @@ case $hw_machine_arch in
"Celeron (Coppermine)") FLAGS='-march=pentium3' ;;
"Pentium III (Coppermine)") FLAGS='-march=pentium3' ;;
"Intel(R) Pentium(R) M processor"*) FLAGS='-march=pentium3m' ;;
+ "Intel(R) Pentium(R) 4 CPU "*) FLAGS='-march=pentium4' ;;
"Intel(R) Celeron(R) CPU "*)
case "$hw_flags" in
*" sse2 "*)
@@ -54,6 +47,16 @@ esac
############
# Everything from this point common between all cpuflags variants.
+if [ "$1" = -v ] ; then
+ shift
+ opt_v=1
+fi
+if [ -n "$1" ]; then
+ CC=$1
+else
+ CC=gcc
+fi
+
if [ -n "$opt_v" ] ; then
if [ -z "$NONE" ] ; then
echo "CPUFLAGS=Unknown"
@@ -77,7 +80,7 @@ fi
if [ -n "$FLAGS" ]; then
gcc_ver=`${CC} -dumpversion | sed 's/^egcs-//'`
- FLAGS=`awk -F: -v "flags=$FLAGS" -v "gcc_ver=$gcc_ver" '
+ FLAGS=`$AWK -F: -v "flags=$FLAGS" -v "gcc_ver=$gcc_ver" '
{ if (gcc_ver < $1){map[$2] = ""$3} }
END { while (flags in map) {flags = map[flags]} print flags }
' <<EOD
diff --git a/devel/cpuflags/files/cpuflags.NetBSD b/devel/cpuflags/files/cpuflags.NetBSD
index c1a5b95cfb0..7aed4f4250e 100755
--- a/devel/cpuflags/files/cpuflags.NetBSD
+++ b/devel/cpuflags/files/cpuflags.NetBSD
@@ -1,16 +1,8 @@
#!/bin/sh
-# $NetBSD: cpuflags.NetBSD,v 1.57 2004/11/14 21:51:05 abs Exp $
+# $NetBSD: cpuflags.NetBSD,v 1.58 2004/12/22 15:12:18 abs Exp $
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
-if [ "$1" = -v ] ; then
- shift
- opt_v=1
-fi
-if [ -n "$1" ]; then
- CC=$1
-else
- CC=gcc
-fi
+AWK=awk
display_hw_details()
{
@@ -86,6 +78,7 @@ case $hw_machine_arch in
*AMD\ K6*) FLAGS='-march=k6' ;;
*AMD\ Duron*) FLAGS='-march=athlon' ;;
*AMD\ Athlon\ 4*) FLAGS='-march=athlon-4' ;;
+ *AMD\ Athlon\ Model\ 4\ \(Thunderbird\)*) FLAGS='-march=athlon-tbird';;
*AMD\ Athlon\ MP*) FLAGS='-march=athlon-mp' ;;
*AMD\ K7\ \(Athlon\)\ XP\ *) FLAGS='-march=athlon-xp' ;;
*AMD\ Athlon\ XP\ *) FLAGS='-march=athlon-xp' ;;
@@ -135,7 +128,8 @@ case $hw_machine_arch in
603\ *) FLAGS='-mcpu=603' ;; # Untested
603e\ *|603ev\ *) FLAGS='-mcpu=603e' ;; # Umax C500 / PM4400
604\ *) FLAGS='-mcpu=604' ;; # Mac 8500
- 604ev\ *) FLAGS='-mcpu=604e' ;; # upgr B&W G3
+ 604e\ *) FLAGS='-mcpu=604e' ;; # upgr B&W G3
+ 604ev\ *) FLAGS='-mcpu=604e' ;; # usually 604e
620\ *) FLAGS='-mcpu=620' ;; # Untested
7400\ *) FLAGS='-mcpu=7400' ;; # AGP G4/400 Mac
7410\ *) FLAGS='-mcpu=7400' ;; # powerbook g4
@@ -173,6 +167,16 @@ esac
############
# Everything from this point common between all cpuflags variants.
+if [ "$1" = -v ] ; then
+ shift
+ opt_v=1
+fi
+if [ -n "$1" ]; then
+ CC=$1
+else
+ CC=gcc
+fi
+
if [ -n "$opt_v" ] ; then
if [ -z "$NONE" ] ; then
echo "CPUFLAGS=Unknown"
@@ -196,7 +200,7 @@ fi
if [ -n "$FLAGS" ]; then
gcc_ver=`${CC} -dumpversion | sed 's/^egcs-//'`
- FLAGS=`awk -F: -v "flags=$FLAGS" -v "gcc_ver=$gcc_ver" '
+ FLAGS=`$AWK -F: -v "flags=$FLAGS" -v "gcc_ver=$gcc_ver" '
{ if (gcc_ver < $1){map[$2] = ""$3} }
END { while (flags in map) {flags = map[flags]} print flags }
' <<EOD
diff --git a/devel/cpuflags/files/cpuflags.SunOS b/devel/cpuflags/files/cpuflags.SunOS
index 076ae6bded0..1c66f5f657a 100755
--- a/devel/cpuflags/files/cpuflags.SunOS
+++ b/devel/cpuflags/files/cpuflags.SunOS
@@ -1,16 +1,8 @@
#!/bin/sh
-# $NetBSD: cpuflags.SunOS,v 1.5 2004/11/03 18:16:27 abs Exp $
+# $NetBSD: cpuflags.SunOS,v 1.6 2004/12/22 15:12:18 abs Exp $
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
-if [ "$1" = -v ] ; then
- shift
- opt_v=1
-fi
-if [ -n "$1" ]; then
- CC=$1
-else
- CC=gcc
-fi
+AWK=nawk
display_hw_details()
{
@@ -29,6 +21,16 @@ esac
############
# Everything from this point common between all cpuflags variants.
+if [ "$1" = -v ] ; then
+ shift
+ opt_v=1
+fi
+if [ -n "$1" ]; then
+ CC=$1
+else
+ CC=gcc
+fi
+
if [ -n "$opt_v" ] ; then
if [ -z "$NONE" ] ; then
echo "CPUFLAGS=Unknown"
@@ -52,7 +54,7 @@ fi
if [ -n "$FLAGS" ]; then
gcc_ver=`${CC} -dumpversion | sed 's/^egcs-//'`
- FLAGS=`awk -F: -v "flags=$FLAGS" -v "gcc_ver=$gcc_ver" '
+ FLAGS=`$AWK -F: -v "flags=$FLAGS" -v "gcc_ver=$gcc_ver" '
{ if (gcc_ver < $1){map[$2] = ""$3} }
END { while (flags in map) {flags = map[flags]} print flags }
' <<EOD