blob: 07beabd10a32fe07a630f1e5ba1bf19cbb08aa8a (
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
|
# $NetBSD: subr_SunOS,v 1.1 2007/08/20 11:21:21 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`
hw_psrinfo=`psrinfo -v | $AWK 'NR==3{print}'` # Just gets the first CPU
}
determine_arch()
{
ARCH=
case $hw_arch in
sun4c | sun4 ) ARCH='-mcpu=cypress' ;;
sun4m ) ARCH='-mcpu=supersparc' ;;
sun4u ) ARCH='-mcpu=v9' ;;
i86pc )
case "$hw_psrinfo" in
*AMD\ Opteron\(tm\)*) ARCH="-mcpu=opteron" ;;
esac
;;
esac
echo $ARCH
}
determine_features()
{
echo
}
|