blob: dc568a7b36d88f4ed71f647a8a7ab7637f0f0f9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# $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
}
|