diff options
Diffstat (limited to 'devel/cpuflags/files/cpuflags.NetBSD')
-rwxr-xr-x | devel/cpuflags/files/cpuflags.NetBSD | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/devel/cpuflags/files/cpuflags.NetBSD b/devel/cpuflags/files/cpuflags.NetBSD index 378ced429e2..8c36a0e132a 100755 --- a/devel/cpuflags/files/cpuflags.NetBSD +++ b/devel/cpuflags/files/cpuflags.NetBSD @@ -1,12 +1,14 @@ #!/bin/sh -# $NetBSD: cpuflags.NetBSD,v 1.8 2001/08/10 09:03:07 abs Exp $ +# $NetBSD: cpuflags.NetBSD,v 1.9 2001/08/27 20:58:38 abs Exp $ if [ -x /sbin/sysctl ] ;then - hw_model=`/sbin/sysctl -n hw.model` -else # NetBSD 1.3 - hw_model=`/usr/sbin/sysctl -n hw.model` + SYSCTL=/sbin/sysctl +else + SYSCTL=/usr/sbin/sysctl # NetBSD 1.3 fi +hw_model=`$SYSCTL -n hw.model` + case $hw_model in # i386 *386-class*) FLAGS='-march=i386' ;; @@ -27,14 +29,21 @@ case $hw_model in 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 ;; + hw_machine=`$SYSCTL -n hw.machine` # arm32 split post 1.5 + case $hw_machine in + cats|dnard|hpcarm|netwinder) + FLAGS="-mcpu=strongarm110" ;; + *) + # The memorybus in strongarm risc pc machines cannot support + # certain strongarm instructions, but in 1.5 and earlier all + # strongarm machines are 'arm32', so uname or sysctl no use + if egrep -q ofbus0|footbridge0 /var/run/dmesg.boot 2>/dev/null \ + ; then + FLAGS="-mcpu=strongarm110" # dnard/cats + else + FLAGS="-march=armv3m -mtune=strongarm" # risc pc + fi + esac ;; # *) echo "Unknown hw.model '$hw_model'" >&2 esac |