diff options
author | abs <abs@pkgsrc.org> | 2007-03-21 15:05:08 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2007-03-21 15:05:08 +0000 |
commit | 09e92dd968244206bac941a64ff0b125f4973ad0 (patch) | |
tree | 8153285c8596237d3c54ee4b06cbfef68f954e3a /devel/cpuflags/files | |
parent | c9b98db71603b6deafb37c5599bb83290f324ee3 (diff) | |
download | pkgsrc-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/files')
-rwxr-xr-x | devel/cpuflags/files/cpuflags.Linux | 5 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.NetBSD | 15 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.SunOS | 5 |
3 files changed, 21 insertions, 4 deletions
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 |