2013-09-26 17:14:40 +02:00

46 lines
808 B
Plaintext
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
}