bump version
[buildroot.git] / package / gnuconfig / patches / config.guess.uclibc.patch
blobedcc9424687fe87d51b9a66089f77c9000f1bb6c
1 Index: config.guess
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
8 @@ -139,6 +139,23 @@
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>
16 + #ifdef __UCLIBC__
17 + # ifdef __UCLIBC_CONFIG_VERSION__
18 + LIBC=uclibc __UCLIBC_CONFIG_VERSION__
19 + # else
20 + LIBC=uclibc
21 + # endif
22 + #else
23 + LIBC=gnu
24 + #endif
25 +EOF
26 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
27 +fi
29 # Note: order is significant - the case branches are not exclusive.
31 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
32 @@ -840,31 +857,31 @@
33 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
34 | grep -q __ARM_EABI__
35 then
36 - echo ${UNAME_MACHINE}-unknown-linux-gnu
37 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
38 else
39 - echo ${UNAME_MACHINE}-unknown-linux-gnueabi
40 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
42 exit ;;
43 avr32*:Linux:*:*)
44 - echo ${UNAME_MACHINE}-unknown-linux-gnu
45 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
46 exit ;;
47 cris:Linux:*:*)
48 - echo cris-axis-linux-gnu
49 + echo cris-axis-linux-${LIBC}
50 exit ;;
51 crisv32:Linux:*:*)
52 - echo crisv32-axis-linux-gnu
53 + echo crisv32-axis-linux-${LIBC}
54 exit ;;
55 frv:Linux:*:*)
56 - echo frv-unknown-linux-gnu
57 + echo frv-unknown-linux-${LIBC}
58 exit ;;
59 ia64:Linux:*:*)
60 - echo ${UNAME_MACHINE}-unknown-linux-gnu
61 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
62 exit ;;
63 m32r*:Linux:*:*)
64 - echo ${UNAME_MACHINE}-unknown-linux-gnu
65 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
66 exit ;;
67 m68*:Linux:*:*)
68 - echo ${UNAME_MACHINE}-unknown-linux-gnu
69 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
70 exit ;;
71 mips:Linux:*:*)
72 eval $set_cc_for_build
73 @@ -887,7 +904,7 @@
74 s: ::g
76 }'`"
77 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
78 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
80 mips64:Linux:*:*)
81 eval $set_cc_for_build
82 @@ -910,16 +927,16 @@
83 s: ::g
85 }'`"
86 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
87 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
89 or32:Linux:*:*)
90 - echo or32-unknown-linux-gnu
91 + echo or32-unknown-linux-${LIBC}
92 exit ;;
93 ppc:Linux:*:*)
94 - echo powerpc-unknown-linux-gnu
95 + echo powerpc-unknown-linux-${LIBC}
96 exit ;;
97 ppc64:Linux:*:*)
98 - echo powerpc64-unknown-linux-gnu
99 + echo powerpc64-unknown-linux-${LIBC}
100 exit ;;
101 alpha:Linux:*:*)
102 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
103 @@ -932,40 +949,40 @@
104 EV68*) UNAME_MACHINE=alphaev68 ;;
105 esac
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}
111 exit ;;
112 parisc:Linux:*:* | hppa:Linux:*:*)
113 # Look for CPU level
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} ;;
121 esac
122 exit ;;
123 parisc64:Linux:*:* | hppa64:Linux:*:*)
124 - echo hppa64-unknown-linux-gnu
125 + echo hppa64-unknown-linux-${LIBC}
126 exit ;;
127 s390:Linux:*:* | s390x:Linux:*:*)
128 echo ${UNAME_MACHINE}-ibm-linux
129 exit ;;
130 sh64*:Linux:*:*)
131 - echo ${UNAME_MACHINE}-unknown-linux-gnu
132 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
133 exit ;;
134 sh*:Linux:*:*)
135 - echo ${UNAME_MACHINE}-unknown-linux-gnu
136 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
137 exit ;;
138 sparc:Linux:*:* | sparc64:Linux:*:*)
139 - echo ${UNAME_MACHINE}-unknown-linux-gnu
140 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
141 exit ;;
142 vax:Linux:*:*)
143 - echo ${UNAME_MACHINE}-dec-linux-gnu
144 + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
145 exit ;;
146 x86_64:Linux:*:*)
147 - echo x86_64-unknown-linux-gnu
148 + echo x86_64-unknown-linux-${LIBC}
149 exit ;;
150 xtensa*:Linux:*:*)
151 - echo ${UNAME_MACHINE}-unknown-linux-gnu
152 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
153 exit ;;
154 i*86:Linux:*:*)
155 # The BFD linker knows what the default object file format is, so
156 @@ -980,20 +997,22 @@
158 case "$ld_supported_targets" in
159 elf32-i386)
160 - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
161 + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
163 a.out-i386-linux)
164 - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
165 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
166 exit ;;
167 coff-i386)
168 - echo "${UNAME_MACHINE}-pc-linux-gnucoff"
169 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
170 exit ;;
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"
176 exit ;;
177 esac
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