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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
$NetBSD: patch-aa,v 1.24 2010/08/18 11:20:56 wiz Exp $
--- config.orig 2010-03-09 17:08:24.000000000 +0000
+++ config
@@ -49,6 +49,7 @@ done
# First get uname entries that we use below
[ "$MACHINE" ] || MACHINE=`(uname -m) 2>/dev/null` || MACHINE="unknown"
+[ "$MACHINE_ARCH" ] || MACHINE_ARCH=`(uname -p) 2>/dev/null` || MACHINE_ARCH="unknown"
[ "$RELEASE" ] || RELEASE=`(uname -r) 2>/dev/null` || RELEASE="unknown"
[ "$SYSTEM" ] || SYSTEM=`(uname -s) 2>/dev/null` || SYSTEM="unknown"
[ "$BUILD" ] || VERSION=`(uname -v) 2>/dev/null` || VERSION="unknown"
@@ -154,6 +155,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${
echo "mips4-sgi-irix64"; exit 0
;;
+ Interix:*)
+ echo "i386-pc-interix"; exit 0
+ ;;
+
Linux:[2-9].*)
echo "${MACHINE}-whatever-linux2"; exit 0
;;
@@ -210,12 +215,16 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${
echo "${MACHINE}-whatever-freebsd"; exit 0
;;
+ DragonFly:*)
+ echo "${MACHINE}-whatever-dragonfly"; exit 0
+ ;;
+
NetBSD:*:*:*386*)
echo "`(/usr/sbin/sysctl -n hw.model || /sbin/sysctl -n hw.model) | sed 's,.*\(.\)86-class.*,i\186,'`-whatever-netbsd"; exit 0
;;
NetBSD:*)
- echo "${MACHINE}-whatever-netbsd"; exit 0
+ echo "${MACHINE_ARCH}-whatever-netbsd"; exit 0
;;
OpenBSD:*)
@@ -661,13 +670,18 @@ case "$GUESSOS" in
;;
*-*-sunos4) OUT="sunos-$CC" ;;
+ alpha-*-netbsd|arm-*-netbsd|arm32-*-netbsd|m68000-*-netbsd|m68k-*-netbsd|\
+ mipseb-*-netbsd|mipsel-*-netbsd|ns32k-*-netbsd|powerpc-*-netbsd|\
+ sparc-*-netbsd|sparc64-*-netbsd|vax-*-netbsd|x86_64-*-netbsd)
+ OUT="NetBSD-${MACHINE_ARCH}" ;;
+
*86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;;
alpha*-*-*bsd*) OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;;
powerpc64-*-*bsd*) OUT="BSD-generic64"; options="$options -DB_ENDIAN" ;;
sparc64-*-*bsd*) OUT="BSD-sparc64" ;;
ia64-*-*bsd*) OUT="BSD-ia64" ;;
- amd64-*-*bsd*) OUT="BSD-x86_64" ;;
- *86*-*-*bsd*) # mimic ld behaviour when it's looking for libc...
+ amd64-*-*bsd*|x86_64-*-dragonfly*) OUT="BSD-x86_64" ;;
+ *86*-*-*bsd*|*-dragonfly*) # mimic ld behaviour when it's looking for libc...
if [ -L /usr/lib/libc.so ]; then # [Free|Net]BSD
libc=/usr/lib/libc.so
else # OpenBSD
@@ -680,6 +694,8 @@ case "$GUESSOS" in
esac ;;
*-*-*bsd*) OUT="BSD-generic32" ;;
+ *-*-interix) OUT="Interix" ;;
+
*-*-osf) OUT="osf1-alpha-cc" ;;
*-*-tru64) OUT="tru64-alpha-cc" ;;
*-*-[Uu]nix[Ww]are7)
|