summaryrefslogtreecommitdiff
path: root/devel/cpuflags
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2008-12-04 11:45:35 +0000
committerabs <abs@pkgsrc.org>2008-12-04 11:45:35 +0000
commitc0203d9519bfccdd574e377b7d18cbb19a4c9831 (patch)
treec627be5ab32d7324381cacbc0a74371c66395645 /devel/cpuflags
parentf01a445b3785aa3a884bd25a41faadd127089550 (diff)
downloadpkgsrc-c0203d9519bfccdd574e377b7d18cbb19a4c9831.tar.gz
Updated devel/cpuflags to 1.20
- Add cases for: 'Intel Pentium III Xeon (686-class)' (Thanks Jum Wise) 'Intel Pentium M (Dothan) (686-class)' (My T41p) - Remove duplicate m68k fpu check - Fix pentium2/pentium3 tranposition introduced in v1.19
Diffstat (limited to 'devel/cpuflags')
-rw-r--r--devel/cpuflags/Makefile4
-rwxr-xr-xdevel/cpuflags/files/subr_NetBSD22
-rw-r--r--devel/cpuflags/files/subr_gcc18
3 files changed, 25 insertions, 19 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile
index ca97f1d9df0..fa9219a142e 100644
--- a/devel/cpuflags/Makefile
+++ b/devel/cpuflags/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.125 2008/12/01 17:51:40 abs Exp $
+# $NetBSD: Makefile,v 1.126 2008/12/04 11:45:35 abs Exp $
-DISTNAME= cpuflags-1.19
+DISTNAME= cpuflags-1.20
CATEGORIES= devel sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/devel/cpuflags/files/subr_NetBSD b/devel/cpuflags/files/subr_NetBSD
index df01bdf5e78..425cf28fd78 100755
--- a/devel/cpuflags/files/subr_NetBSD
+++ b/devel/cpuflags/files/subr_NetBSD
@@ -1,4 +1,4 @@
-# $NetBSD: subr_NetBSD,v 1.3 2008/12/01 17:51:40 abs Exp $
+# $NetBSD: subr_NetBSD,v 1.4 2008/12/04 11:45:35 abs Exp $
AWK=awk
SED=sed
@@ -95,14 +95,16 @@ determine_arch()
i386 | x86_64)
case "$cpu" in
'AMD Athlon 64 or Athlon 64 FX or Opteron '*) ARCH='-march=opteron' ;;
- 'AMD Athlon 64 or Sempron (686-class),'*) ARCH='-march=athlon64' ;;
+ 'AMD Athlon 64 or Sempron (686-class)'*) ARCH='-march=athlon64' ;;
'AMD Dual-Core Opteron or Athlon 64 X2 '*) ARCH='-march=opteron' ;;
- 'Intel (686-class),'*) ARCH='-march=pentiumpro' ;;
- 'Intel Celeron (686-class),'*) ARCH='-march=pentiumpro' ;;
- 'Intel Core 2 (Merom) (686-class),'*) ARCH='-march=core2' ;;
- 'Intel Pentium 4 (686-class),'*) ARCH='-march=pentium4' ;;
- 'Intel Pentium II (686-class),'*) ARCH='-march=pentium3' ;;
- 'Intel Pentium III (686-class),'*) ARCH='-march=pentium2' ;;
+ 'Intel (686-class)'*) ARCH='-march=pentiumpro' ;;
+ 'Intel Celeron (686-class)'*) ARCH='-march=pentiumpro' ;;
+ 'Intel Core 2 (Merom) (686-class)'*) ARCH='-march=core2' ;;
+ 'Intel Pentium 4 (686-class)'*) ARCH='-march=pentium4' ;;
+ 'Intel Pentium II (686-class)'*) ARCH='-march=pentium2' ;;
+ 'Intel Pentium III (686-class)'*) ARCH='-march=pentium3' ;;
+ 'Intel Pentium III Xeon (686-class)'*) ARCH='-march=pentium3' ;;
+ 'Intel Pentium M (Dothan) (686-class)'*) ARCH='-march=pentium-m' ;;
# Fallback classes
*'(586-class)'*) ARCH='-march=pentium' ;;
*'(486-class)'*) ARCH='-march=i486' ;;
@@ -115,10 +117,6 @@ determine_arch()
*\(68040*|*\ MC68040\ *) ARCH='-m68040' ;; # Untested
*\(68060*|*\ MC68060\ *) ARCH='-m68060' ;; # Upgraded amiga 3000
esac
- case "$(egrep '^fpu0 ' /var/run/dmesg.boot)" in
- *\(emulator\)*) FEATURES="-msoft-float" ;;
- *\(no\ math\ support\)*) FEATURES="-msoft-float" ;;
- esac
;;
mipseb|mipsel)
diff --git a/devel/cpuflags/files/subr_gcc b/devel/cpuflags/files/subr_gcc
index 1123d672331..4ae3fa6f79e 100644
--- a/devel/cpuflags/files/subr_gcc
+++ b/devel/cpuflags/files/subr_gcc
@@ -1,4 +1,4 @@
-# $NetBSD: subr_gcc,v 1.3 2008/12/01 17:51:40 abs Exp $
+# $NetBSD: subr_gcc,v 1.4 2008/12/04 11:45:35 abs Exp $
# Return gcc version string
gcc_ver()
@@ -24,12 +24,20 @@ gcc_fixup_arch_flags()
# -march=k6-3 -> -march=k6 -> -march=pentium -> -march=i486
#
# The format of table is
- # gcc_version_in_which_option_was_introduced new_option old_option
+ # gcc_version_in_which_option_was_introduced : new_option : old_option
$AWK -F: -v "flags=$gcc_arch_flags" -v "gcc_ver=$(gcc_ver $gcc)" '
- { if (gcc_ver < $1){map[$2] = ""$3} }
- END { FS=" "; split(flags,ar); for (af in ar) { flag=ar[af];
- while (flag in map) {flag = map[flag]} print flag }}
+ { if (gcc_ver < $1) { map[$2] = ""$3 } }
+ END {
+ FS=" "; split(flags, flaglist);
+ for (af in flaglist) {
+ flag = flaglist[af];
+ while (flag in map) {
+ flag = map[flag]
+ }
+ print flag
+ }
+ }
' <<EOD
2.90:-march=i386:-mno-486
2.90:-march=i486:-m486