pkgsrc/devel/cpuflags/files/subr_SunOS
abs 9fa0f5ba7c Updated devel/cpuflags to 1.39
- Add "Intel(r) Xeon(r) CPU           E5430" and strip leading whitespace from
  Solaris psrinfo output - from Jim Wise
- Add "Intel(R) Xeon(R) CPU           E5310" - from Felix Resch
- Add "Genuine Intel(R) CPU           T2500" - from Daniel Carosone
2009-03-04 00:32:44 +00:00

45 lines
808 B
Text
Executable file

# $NetBSD: subr_SunOS,v 1.5 2009/03/04 00:32:44 abs Exp $
AWK=nawk
SED=sed
display_hw_details()
{
cat <<END
OS : '$(uname)'
arch : '$hw_arch'
psrinfo : '$hw_psrinfo'
END
}
extract_hw_details()
{
hw_arch=$(/usr/bin/uname -m)
# Just gets the first CPU
hw_psrinfo=$(psrinfo -pv | $AWK 'NR==3{sub(" *","");print}')
}
determine_arch()
{
ARCH=
case $hw_arch in
sun4c | sun4 ) ARCH='-mcpu=cypress' ;;
sun4m ) ARCH='-mcpu=supersparc' ;;
sun4u ) ARCH='-mcpu=v9' ;;
i86pc )
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
}
determine_features()
{
echo
}