summaryrefslogtreecommitdiff
path: root/devel/cpuflags
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2001-06-28 22:23:00 +0000
committerabs <abs@pkgsrc.org>2001-06-28 22:23:00 +0000
commitf9563d48472a047f3c7641ac0ec9a2a23d39666b (patch)
treeddd84b3ec257e8b5222aeb0f5283dced05deec08 /devel/cpuflags
parent329cc45198914f69faaa876b294cd11aedd854fc (diff)
downloadpkgsrc-f9563d48472a047f3c7641ac0ec9a2a23d39666b.tar.gz
Updated cpuflags to 0.5
Use -mcpu=v9 for ultrasparc, not -mcpu=ultrasparc, add an entry for sparc2, and add an entry for a sparc2 (cypress)
Diffstat (limited to 'devel/cpuflags')
-rw-r--r--devel/cpuflags/Makefile4
-rwxr-xr-xdevel/cpuflags/files/cpuflags.NetBSD108
2 files changed, 54 insertions, 58 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile
index 7755a4309d1..ab363839302 100644
--- a/devel/cpuflags/Makefile
+++ b/devel/cpuflags/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2001/06/26 10:39:33 abs Exp $
+# $NetBSD: Makefile,v 1.5 2001/06/28 22:23:00 abs Exp $
#
-DISTNAME= cpuflags-0.4
+DISTNAME= cpuflags-0.5
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/devel/cpuflags/files/cpuflags.NetBSD b/devel/cpuflags/files/cpuflags.NetBSD
index d36e0a470a6..d7b613751ef 100755
--- a/devel/cpuflags/files/cpuflags.NetBSD
+++ b/devel/cpuflags/files/cpuflags.NetBSD
@@ -1,68 +1,64 @@
#!/bin/sh
-# $NetBSD: cpuflags.NetBSD,v 1.4 2001/06/26 10:39:34 abs Exp $
+# $NetBSD: cpuflags.NetBSD,v 1.5 2001/06/28 22:23:00 abs Exp $
-gcc_ver=`gcc -v 2>&1 | awk '/gcc version/ {print $3}'`
hw_model=`sysctl -n hw.model`
-case $gcc_ver in
- egcs* )
- gcc_ver=2.8 ;;
+case $hw_model in
+ # i386
+ *386-class*) FLAGS='-march=i386' ;;
+ *486-class*) FLAGS='-march=i486' ;;
+ *586-class*) FLAGS='-march=pentium' ;;
+ *686-class*) FLAGS='-march=pentiumpro' ;;
+ #
+ # sparc
+ MB86904* | MB86907*) FLAGS="-mcpu=supersparc" ;; # ss5
+ TMS390Z50*) FLAGS="-mcpu=supersparc" ;; # ss10/ss20
+ MB86930* | MB86934*) FLAGS="-mcpu=sparclite" ;; # from gcc
+ MB86900/1A*) FLAGS="-mcpu=cypress" ;; # ss1+
+ CY7C601*) FLAGS="-mcpu=cypress" ;; # ss2
+ # under 1.5.1 -mcpu=ultrasparc chokes egcs-2.91.66 compiling perl
+ SUNW,UltraSPARC*) FLAGS="-mcpu=v9" ;; # Ultra
+ #
+ # arm32
+ ARM610*) FLAGS="-mcpu=arm610" ;; # risc pc
+ ARM710*) FLAGS="-mcpu=arm710" ;; # risc pc
+ SA-110*)
+ # The memorybus in strongarm risc pc machines cannot support
+ # certain strongarm instructions, but we cannot tell a shark
+ # from such a risc pc via uname or sysctl (Certainly for 1.5)
+ if grep -q ofbus0 /var/run/dmesg.boot 2>/dev/null ; then
+ FLAGS="-mcpu=strongarm110" # shark
+ else
+ FLAGS="-march=armv3m -mtune=strongarm" # risc pc
+ fi ;;
+ #
+ *) echo "Unknown hw.model '$hw_model'" >&2
esac
-if [ "$gcc_ver" \< 2.8 ];then # Old gcc, such as in NetBSD 1.3
-
- case $hw_model in
- # i386
- *386-class*) FLAGS='-mno-486' ;;
- *486-class*) FLAGS='-m486' ;;
- *586-class*) FLAGS='-m486' ;;
- *686-class*) FLAGS='-m486' ;;
- #
- # sparc
- MB86904* | MB86907*) FLAGS="-msupersparc" ;; # ss5
- TMS390Z50*) FLAGS="-msupersparc" ;; # ss10/ss20
- MB86930* | MB86934*) FLAGS="-msparclite" ;; # from gcc
- MB86900/1A*) FLAGS="-mcypress" ;; # ss1+
- #
- # arm
- SA-110*) FLAGS="" ;; # shark
- #
- *) echo "Unknown hw.model '$hw_model'" >&2
- esac
-
-else # Modern gcc
-
- case $hw_model in
- # i386
- *386-class*) FLAGS='-march=i386' ;;
- *486-class*) FLAGS='-march=i486' ;;
- *586-class*) FLAGS='-march=pentium' ;;
- *686-class*) FLAGS='-march=pentiumpro' ;;
- #
- # sparc
- MB86904* | MB86907*) FLAGS="-mcpu=supersparc" ;; # ss5
- TMS390Z50*) FLAGS="-mcpu=supersparc" ;; # ss10/ss20
- MB86930* | MB86934*) FLAGS="-mcpu=sparclite" ;; # from gcc
- MB86900/1A*) FLAGS="-mcpu=cypress" ;; # ss1+
- SUNW,UltraSPARC*) FLAGS="-mcpu=ultrasparc" ;; # Ultra
- #
- # arm32
- ARM610*) FLAGS="-mcpu=arm610" ;; # risc pc
- ARM710*) FLAGS="-mcpu=arm710" ;; # risc pc
- SA-110*)
- # The memorybus in strongarm risc pc machines cannot support
- # certain strongarm instructions, but we cannot tell a shark
- # from such a risc pc via uname or sysctl (Certainly for 1.5)
- if grep -q ofbus0 /var/run/dmesg.boot 2>/dev/null ; then
- FLAGS="-mcpu=strongarm110" # shark
- else
- FLAGS="-march=armv3m -mtune=strongarm" # risc pc
- fi ;;
- #
- *) echo "Unknown hw.model '$hw_model'" >&2
+if [ -n "$FLAGS" ];then
+ gcc_ver=`gcc -v 2>&1 | awk '/gcc version/ {print $3}'`
+ case $gcc_ver in
+ egcs* )
+ gcc_ver=2.8 ;;
esac
+ if [ "$gcc_ver" \< 2.8 ];then # Old gcc, such as in NetBSD 1.3
+ FLAGS=`awk -v "flags=$FLAGS" '
+{map["-m"$1] = "-m"$2}
+END{print map[flags]}' <<EOD
+arch=i386 no-486
+arch=i486 486
+arch=pentium 486
+arch=pentiumpro 486
+cpu=supersparc supersparc
+cpu=sparclite sparclite
+cpu=cypress cypress
+cpu=v9 v8
+EOD
+`
+ fi
fi
+
echo $FLAGS
exit 0