summaryrefslogtreecommitdiff
path: root/devel/libtool/patches/patch-ac
blob: b91965df514efb0a1174b969413c68693fd82a0a (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
46
47
48
49
50
51
52
$NetBSD: patch-ac,v 1.7 2001/02/27 08:20:25 skrll Exp $

--- config.guess.orig	Mon Aug 28 05:05:02 2000
+++ config.guess
@@ -118,33 +118,24 @@
 	# compatibility and a consistent mechanism for selecting the
 	# object file format.
 	# Determine the machine/vendor (is the vendor relevant).
-	case "${UNAME_MACHINE}" in
-	    amiga) machine=m68k-unknown ;;
-	    arm32) machine=arm-unknown ;;
-	    atari*) machine=m68k-atari ;;
-	    sun3*) machine=m68k-sun ;;
-	    mac68k) machine=m68k-apple ;;
-	    macppc) machine=powerpc-apple ;;
-	    hp3[0-9][05]) machine=m68k-hp ;;
-	    ibmrt|romp-ibm) machine=romp-ibm ;;
-	    *) machine=${UNAME_MACHINE}-unknown ;;
+	PATH=$PATH:/sbin:/usr/sbin
+	UNAME_MACHINE_ARCH=`(uname -p || sysctl -n hw.machine_arch || echo unknown) 2>/dev/null`
+	case "${UNAME_MACHINE_ARCH}:${UNAME_RELEASE}" in
+	    arm26:*)			UNAME_MACHINE_ARCH=armv2;;
+	    arm32:*)			UNAME_MACHINE_ARCH=arm;;
+	    mips:*)			UNAME_MACHINE_ARCH=mipsel;;
+	    i386:*|m68k:*|ns32k:*|sparc:*|vax:*)
+		# The Operating System including object format.
+		if echo __ELF__ | $CC_FOR_BUILD -E - | grep -q __ELF__; then
+		    UNAME_OBJFORMAT=
+		else
+		    UNAME_OBJFORMAT=elf
+		fi;;
 	esac
-	# The Operating System including object format.
-	if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-		| grep __ELF__ >/dev/null
-	then
-	    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-	    # Return netbsd for either.  FIX?
-	    os=netbsd
-	else
-	    os=netbsdelf
-	fi
-	# The OS release
-	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
+	echo ${UNAME_MACHINE_ARCH}-netbsd${UNAME_OBJFORMAT}`echo ${UNAME_RELEASE} | sed -e 's/[-_].*/\./'`
 	exit 0 ;;
     alpha:OSF1:*:*)
 	if test $UNAME_RELEASE = "V4.0"; then