summaryrefslogtreecommitdiff
path: root/devel/cpuflags/files/subr_SunOS
diff options
context:
space:
mode:
Diffstat (limited to 'devel/cpuflags/files/subr_SunOS')
-rwxr-xr-xdevel/cpuflags/files/subr_SunOS14
1 files changed, 9 insertions, 5 deletions
diff --git a/devel/cpuflags/files/subr_SunOS b/devel/cpuflags/files/subr_SunOS
index 07beabd10a3..c6162baf9f1 100755
--- a/devel/cpuflags/files/subr_SunOS
+++ b/devel/cpuflags/files/subr_SunOS
@@ -1,4 +1,4 @@
-# $NetBSD: subr_SunOS,v 1.1 2007/08/20 11:21:21 abs Exp $
+# $NetBSD: subr_SunOS,v 1.2 2008/12/10 23:27:17 abs Exp $
AWK=nawk
SED=sed
@@ -15,7 +15,7 @@ END
extract_hw_details()
{
hw_arch=`/usr/bin/uname -m`
- hw_psrinfo=`psrinfo -v | $AWK 'NR==3{print}'` # Just gets the first CPU
+ hw_psrinfo=`psrinfo -pv | $AWK 'NR==3{print}'` # Just gets the first CPU
}
determine_arch()
@@ -26,9 +26,13 @@ determine_arch()
sun4m ) ARCH='-mcpu=supersparc' ;;
sun4u ) ARCH='-mcpu=v9' ;;
i86pc )
- case "$hw_psrinfo" in
- *AMD\ Opteron\(tm\)*) ARCH="-mcpu=opteron" ;;
- esac
+ include subr_x86 # this provides map_x86_brand_string()
+ ARCH=$(map_x86_brand_string "$cpu_brand")
+ if [ -z "$ARCH" ] ; then
+ case "$hw_psrinfo" in
+ *)
+ esac
+ fi
;;
esac
echo $ARCH