2 ===================================================================
3 RCS file: /cvsroot/config/config/config.guess,v
4 retrieving revision 1.376
5 diff -u -r1.376 config.guess
6 --- config.guess 23 Jan 2008 01:22:36 -0000 1.376
7 +++ config.guess 23 Jan 2008 17:17:46 -0000
9 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
10 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
12 +if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
13 + eval $set_cc_for_build
14 + cat << EOF > $dummy.c
15 + #include <features.h>
17 + # ifdef __UCLIBC_CONFIG_VERSION__
18 + LIBC=uclibc __UCLIBC_CONFIG_VERSION__
26 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
29 # Note: order is significant - the case branches are not exclusive.
31 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
33 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
34 | grep -q __ARM_EABI__
36 - echo ${UNAME_MACHINE}-unknown-linux-gnu
37 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
39 - echo ${UNAME_MACHINE}-unknown-linux-gnueabi
40 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
44 - echo ${UNAME_MACHINE}-unknown-linux-gnu
45 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
48 - echo cris-axis-linux-gnu
49 + echo cris-axis-linux-${LIBC}
52 - echo crisv32-axis-linux-gnu
53 + echo crisv32-axis-linux-${LIBC}
56 - echo frv-unknown-linux-gnu
57 + echo frv-unknown-linux-${LIBC}
60 - echo ${UNAME_MACHINE}-unknown-linux-gnu
61 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
64 - echo ${UNAME_MACHINE}-unknown-linux-gnu
65 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
68 - echo ${UNAME_MACHINE}-unknown-linux-gnu
69 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
72 eval $set_cc_for_build
77 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
78 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
81 eval $set_cc_for_build
86 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
87 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
90 - echo or32-unknown-linux-gnu
91 + echo or32-unknown-linux-${LIBC}
94 - echo powerpc-unknown-linux-gnu
95 + echo powerpc-unknown-linux-${LIBC}
98 - echo powerpc64-unknown-linux-gnu
99 + echo powerpc64-unknown-linux-${LIBC}
102 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
103 @@ -932,40 +949,40 @@
104 EV68*) UNAME_MACHINE=alphaev68 ;;
106 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
107 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
108 - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
109 + if test "$?" = 0 ; then LIBC="gnulibc1" ; else LIBC="" ; fi
110 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
112 parisc:Linux:*:* | hppa:Linux:*:*)
114 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
115 - PA7*) echo hppa1.1-unknown-linux-gnu ;;
116 - PA8*) echo hppa2.0-unknown-linux-gnu ;;
117 - *) echo hppa-unknown-linux-gnu ;;
118 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
119 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
120 + *) echo hppa-unknown-linux-${LIBC} ;;
123 parisc64:Linux:*:* | hppa64:Linux:*:*)
124 - echo hppa64-unknown-linux-gnu
125 + echo hppa64-unknown-linux-${LIBC}
127 s390:Linux:*:* | s390x:Linux:*:*)
128 echo ${UNAME_MACHINE}-ibm-linux
131 - echo ${UNAME_MACHINE}-unknown-linux-gnu
132 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
135 - echo ${UNAME_MACHINE}-unknown-linux-gnu
136 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
138 sparc:Linux:*:* | sparc64:Linux:*:*)
139 - echo ${UNAME_MACHINE}-unknown-linux-gnu
140 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
143 - echo ${UNAME_MACHINE}-dec-linux-gnu
144 + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
147 - echo x86_64-unknown-linux-gnu
148 + echo x86_64-unknown-linux-${LIBC}
151 - echo ${UNAME_MACHINE}-unknown-linux-gnu
152 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
155 # The BFD linker knows what the default object file format is, so
156 @@ -980,20 +997,22 @@
158 case "$ld_supported_targets" in
160 - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
161 + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
164 - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
165 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
168 - echo "${UNAME_MACHINE}-pc-linux-gnucoff"
169 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
172 # Either a pre-BFD a.out linker (linux-gnuoldld) or
173 # one that does not give us useful --help.
174 - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
175 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
178 + # This should get integrated into the C code below, but now we hack
179 + if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
180 # Determine whether the default compiler is a.out or elf
181 eval $set_cc_for_build
182 sed 's/^ //' << EOF >$dummy.c