summaryrefslogtreecommitdiff
path: root/devel/cpuflags
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2007-03-21 15:05:08 +0000
committerabs <abs@pkgsrc.org>2007-03-21 15:05:08 +0000
commit09e92dd968244206bac941a64ff0b125f4973ad0 (patch)
tree8153285c8596237d3c54ee4b06cbfef68f954e3a /devel/cpuflags
parentc9b98db71603b6deafb37c5599bb83290f324ee3 (diff)
downloadpkgsrc-09e92dd968244206bac941a64ff0b125f4973ad0.tar.gz
Update cpuflags to 1.06:
On NetBSD use 'sysctl -n machdep.sse2' and 'sysctl -n machdep.sse' to determine whether to add '-mfpmath=sse -msse2' or '-mfpmath=sse -msse' to CPUFLAGS. This ensures these values are set correctly in the event of the kernel not providing sufficient identification details on the CPU. - from Blair Sadewitz
Diffstat (limited to 'devel/cpuflags')
-rw-r--r--devel/cpuflags/Makefile4
-rwxr-xr-xdevel/cpuflags/files/cpuflags.Linux5
-rwxr-xr-xdevel/cpuflags/files/cpuflags.NetBSD15
-rwxr-xr-xdevel/cpuflags/files/cpuflags.SunOS5
4 files changed, 23 insertions, 6 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile
index 954ec1fb0aa..3eb75955da4 100644
--- a/devel/cpuflags/Makefile
+++ b/devel/cpuflags/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.108 2006/11/30 23:24:39 abs Exp $
+# $NetBSD: Makefile,v 1.109 2007/03/21 15:05:08 abs Exp $
#
-DISTNAME= cpuflags-1.05
+DISTNAME= cpuflags-1.06
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/devel/cpuflags/files/cpuflags.Linux b/devel/cpuflags/files/cpuflags.Linux
index d07256ab9d1..ba97a681849 100755
--- a/devel/cpuflags/files/cpuflags.Linux
+++ b/devel/cpuflags/files/cpuflags.Linux
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: cpuflags.Linux,v 1.21 2006/11/30 23:24:39 abs Exp $
+# $NetBSD: cpuflags.Linux,v 1.22 2007/03/21 15:05:08 abs Exp $
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
AWK=awk
@@ -133,6 +133,9 @@ if [ -n "$FLAGS" ]; then
3.1:-mcpu=21264a:-mcpu=21264
3.1:-mcpu=7400:-mcpu=750
3.1:-mcpu=7450:-mcpu=750
+3.1:-mfpmath=sse:
+3.1:-msse2:
+3.1:-msse:
3.1:-mtune=r2000:-cpu=r2000
3.1:-mtune=r3000:-cpu=r3000
3.1:-mtune=r3900:-cpu=r3900
diff --git a/devel/cpuflags/files/cpuflags.NetBSD b/devel/cpuflags/files/cpuflags.NetBSD
index db5d81cf6ce..da2e6098b4d 100755
--- a/devel/cpuflags/files/cpuflags.NetBSD
+++ b/devel/cpuflags/files/cpuflags.NetBSD
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: cpuflags.NetBSD,v 1.67 2006/11/30 23:24:39 abs Exp $
+# $NetBSD: cpuflags.NetBSD,v 1.68 2007/03/21 15:05:08 abs Exp $
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
AWK=awk
@@ -74,7 +74,8 @@ case $hw_machine_arch in
esac
;;
- i386 | x86_64) case $hw_model in
+ i386 | x86_64)
+ case $hw_model in
*Intel\ Pentium/MMX\ *) FLAGS='-march=pentium-mmx' ;;
*Intel\ Pentium\ II\ *) FLAGS='-march=pentium2' ;;
*Intel\ Pentium\ III\ *) FLAGS='-march=pentium3' ;;
@@ -102,6 +103,13 @@ case $hw_machine_arch in
*586-class*) FLAGS='-march=pentium' ;;
*686-class*) FLAGS='-march=pentiumpro' ;;
esac
+ if [ -n "$FLAGS" -a "$hw_machine_arch" = i386 ] ; then
+ if [ "$(sysctl -n machdep.sse2)" = 1 ] ; then
+ FLAGS="$FLAGS -mfpmath=sse -msse2"
+ elif [ "$(sysctl -n machdep.sse)" = 1 ] ; then
+ FLAGS="$FLAGS -mfpmath=sse -msse"
+ fi
+ fi
;;
m68k) case $hw_model in # Examples
@@ -261,6 +269,9 @@ if [ -n "$FLAGS" ]; then
3.1:-mcpu=21264a:-mcpu=21264
3.1:-mcpu=7400:-mcpu=750
3.1:-mcpu=7450:-mcpu=750
+3.1:-mfpmath=sse:
+3.1:-msse2:
+3.1:-msse:
3.1:-mtune=r2000:-cpu=r2000
3.1:-mtune=r3000:-cpu=r3000
3.1:-mtune=r3900:-cpu=r3900
diff --git a/devel/cpuflags/files/cpuflags.SunOS b/devel/cpuflags/files/cpuflags.SunOS
index 811def7781e..e8dca9e6bf1 100755
--- a/devel/cpuflags/files/cpuflags.SunOS
+++ b/devel/cpuflags/files/cpuflags.SunOS
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: cpuflags.SunOS,v 1.10 2006/10/01 00:59:36 dmcmahill Exp $
+# $NetBSD: cpuflags.SunOS,v 1.11 2007/03/21 15:05:08 abs Exp $
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
AWK=nawk
@@ -106,6 +106,9 @@ if [ -n "$FLAGS" ]; then
3.1:-mcpu=21264a:-mcpu=21264
3.1:-mcpu=7400:-mcpu=750
3.1:-mcpu=7450:-mcpu=750
+3.1:-mfpmath=sse:
+3.1:-msse2:
+3.1:-msse:
3.1:-mtune=r2000:-cpu=r2000
3.1:-mtune=r3000:-cpu=r3000
3.1:-mtune=r3900:-cpu=r3900