]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/binutils/binutils-2.15.91.0.1/binutils-2.15.91.0.1-uclibc-100-conf.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / binutils / binutils-2.15.91.0.1 / binutils-2.15.91.0.1-uclibc-100-conf.patch
1
2 #
3 # Patch managed by http://www.holgerschurig.de/patcher.html
4 #
5
6 --- binutils-2.15.91.0.1/bfd/config.bfd~binutils-2.15.90.0.3-uclibc-100-conf
7 +++ binutils-2.15.91.0.1/bfd/config.bfd
8 @@ -128,7 +128,7 @@
9      targ_defvec=ecoffalpha_little_vec
10      targ_selvecs=bfd_elf64_alpha_vec
11      ;;
12 -  alpha*-*-linux-gnu* | alpha*-*-elf*)
13 +  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
14      targ_defvec=bfd_elf64_alpha_vec
15      targ_selvecs=ecoffalpha_little_vec
16      ;;
17 @@ -138,7 +138,7 @@
18    alpha*-*-*)
19      targ_defvec=ecoffalpha_little_vec
20      ;;
21 -  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
22 +  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu)
23      targ_defvec=bfd_elf64_ia64_little_vec
24      targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
25      ;;
26 @@ -215,7 +215,7 @@
27      targ_defvec=bfd_elf32_littlearm_vec
28      targ_selvecs=bfd_elf32_bigarm_vec
29      ;;
30 -  armeb-*-elf | arm*b-*-linux-gnu*)
31 +  armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
32      targ_defvec=bfd_elf32_bigarm_vec
33      targ_selvecs=bfd_elf32_littlearm_vec
34      ;;
35 @@ -223,8 +223,8 @@
36      targ_defvec=bfd_elf32_littlearm_vec
37      targ_selvecs=bfd_elf32_bigarm_vec
38      ;;
39 -  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
40 -  arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
41 +  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \
42 +  arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
43      targ_defvec=bfd_elf32_littlearm_vec
44      targ_selvecs=bfd_elf32_bigarm_vec
45      ;;
46 @@ -367,7 +367,7 @@
47      ;;
48  
49  #ifdef BFD64
50 -  hppa*64*-*-linux-gnu*)
51 +  hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
52      targ_defvec=bfd_elf64_hppa_linux_vec
53      targ_selvecs=bfd_elf64_hppa_vec
54      ;;
55 @@ -378,7 +378,7 @@
56      ;;
57  #endif
58  
59 -  hppa*-*-linux-gnu* | hppa*-*-netbsd*)
60 +  hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*)
61      targ_defvec=bfd_elf32_hppa_linux_vec
62      targ_selvecs=bfd_elf32_hppa_vec
63      ;;
64 @@ -501,7 +501,7 @@
65      targ_selvecs=bfd_elf32_i386_vec
66      targ_underscore=yes
67      ;;
68 -  i[3-7]86-*-linux-gnu*)
69 +  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
70      targ_defvec=bfd_elf32_i386_vec
71      targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
72      targ64_selvecs=bfd_elf64_x86_64_vec
73 @@ -515,7 +515,7 @@
74      targ_defvec=bfd_elf64_x86_64_vec
75      targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
76      ;;
77 -  x86_64-*-linux-gnu*)
78 +  x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
79      targ_defvec=bfd_elf64_x86_64_vec
80      targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
81      ;;
82 @@ -690,7 +690,7 @@
83      targ_selvecs=bfd_elf32_m68k_vec
84      targ_underscore=yes
85      ;;
86 -  m68*-*-linux-gnu*)
87 +  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
88      targ_defvec=bfd_elf32_m68k_vec
89      targ_selvecs=m68klinux_vec
90      ;;
91 @@ -966,7 +966,8 @@
92      ;;
93  #endif
94    powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
95 -  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
96 +  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
97 +  powerpc-*-rtems* | \
98    powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
99      targ_defvec=bfd_elf32_powerpc_vec
100      targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
101 @@ -1003,8 +1004,8 @@
102      targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
103      ;;
104    powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
105 -  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
106 -  powerpcle-*-rtems*)
107 +  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
108 +  powerpcle-*-vxworks* | powerpcle-*-rtems*)
109      targ_defvec=bfd_elf32_powerpcle_vec
110      targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
111      targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
112 @@ -1165,7 +1166,7 @@
113      targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
114      targ_underscore=yes
115      ;;
116 -  sparc-*-linux-gnu*)
117 +  sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
118      targ_defvec=bfd_elf32_sparc_vec
119      targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
120      ;;
121 @@ -1212,7 +1213,7 @@
122      targ_defvec=sunos_big_vec
123      targ_underscore=yes
124      ;;
125 -  sparc64-*-linux-gnu*)
126 +  sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
127      targ_defvec=bfd_elf64_sparc_vec
128      targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
129      ;;
130 --- binutils-2.15.91.0.1/bfd/configure~binutils-2.15.90.0.3-uclibc-100-conf
131 +++ binutils-2.15.91.0.1/bfd/configure
132 @@ -1687,6 +1687,11 @@
133    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
134    ;;
135  
136 +linux-uclibc*)
137 +  lt_cv_deplibs_check_method=pass_all
138 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
139 +  ;;
140 +
141  netbsd*)
142    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
143      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
144 @@ -5266,7 +5271,7 @@
145    alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
146         COREFILE=''
147         ;;
148 -  alpha*-*-linux-gnu*)
149 +  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
150         COREFILE=trad-core.lo
151         TRAD_HEADER='"hosts/alphalinux.h"'
152         ;;
153 @@ -5326,7 +5331,7 @@
154         COREFILE=trad-core.lo
155         TRAD_HEADER='"hosts/i386mach3.h"'
156         ;;
157 -  i[3-7]86-*-linux-gnu*)
158 +  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
159         COREFILE=trad-core.lo
160         TRAD_HEADER='"hosts/i386linux.h"'
161         ;;
162 @@ -5364,7 +5369,7 @@
163         COREFILE=trad-core.lo
164         TRAD_HEADER='"hosts/hp300bsd.h"'
165         ;;
166 -  m68*-*-linux-gnu*)
167 +  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
168         COREFILE=trad-core.lo
169         TRAD_HEADER='"hosts/m68klinux.h"'
170         ;;
171 --- binutils-2.15.91.0.1/bfd/configure.in~binutils-2.15.90.0.3-uclibc-100-conf
172 +++ binutils-2.15.91.0.1/bfd/configure.in
173 @@ -164,7 +164,7 @@
174    alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
175         COREFILE=''
176         ;;
177 -  alpha*-*-linux-gnu*)
178 +  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
179         COREFILE=trad-core.lo
180         TRAD_HEADER='"hosts/alphalinux.h"'
181         ;;
182 @@ -245,7 +245,7 @@
183         TRAD_HEADER='"hosts/i386mach3.h"'
184         ;;
185  changequote(,)dnl
186 -  i[3-7]86-*-linux-gnu*)
187 +  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
188  changequote([,])dnl
189         COREFILE=trad-core.lo
190         TRAD_HEADER='"hosts/i386linux.h"'
191 @@ -286,7 +286,7 @@
192         COREFILE=trad-core.lo
193         TRAD_HEADER='"hosts/hp300bsd.h"'
194         ;;
195 -  m68*-*-linux-gnu*)
196 +  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
197         COREFILE=trad-core.lo
198         TRAD_HEADER='"hosts/m68klinux.h"'
199         ;;
200 --- binutils-2.15.91.0.1/gas/configure~binutils-2.15.90.0.3-uclibc-100-conf
201 +++ binutils-2.15.91.0.1/gas/configure
202 @@ -3408,6 +3408,11 @@
203    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
204    ;;
205  
206 +linux-uclibc*)
207 +  lt_cv_deplibs_check_method=pass_all
208 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
209 +  ;;
210 +
211  netbsd*)
212    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
213      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
214 @@ -4233,6 +4238,7 @@
215        alpha*-*-osf*)                   fmt=ecoff ;;
216        alpha*-*-linuxecoff*)            fmt=ecoff ;;
217        alpha*-*-linux-gnu*)             fmt=elf em=linux ;;
218 +      alpha*-*-linux-uclibc*)          fmt=elf em=linux ;;
219        alpha*-*-netbsd*)                        fmt=elf em=nbsd ;;
220        alpha*-*-openbsd*)               fmt=elf em=obsd ;;
221  
222 @@ -4249,6 +4255,7 @@
223        arm*-*-conix*)                   fmt=elf ;;
224        arm-*-linux*aout*)               fmt=aout em=linux ;;
225        arm*-*-linux-gnu*)               fmt=elf  em=linux ;;
226 +      arm*-*-linux-uclibc*)            fmt=elf  em=linux ;;
227        arm*-*-uclinux*)                 fmt=elf  em=linux ;;
228        arm-*-netbsdelf*)                 fmt=elf  em=nbsd ;;
229        arm-*-*n*bsd*)                   fmt=aout em=nbsd ;;
230 @@ -4262,6 +4269,7 @@
231        avr-*-*)                         fmt=elf ;;
232  
233        cris-*-linux-gnu*)               fmt=multi bfd_gas=yes em=linux ;;
234 +      cris-*-linux-uclibc*)            fmt=multi bfd_gas=yes em=linux ;;
235        cris-*-*)                                fmt=multi bfd_gas=yes ;;
236  
237        d10v-*-*)                                fmt=elf ;;
238 @@ -4319,7 +4327,9 @@
239        i386-*-linux*oldld)              fmt=aout em=linux ;;
240        i386-*-linux*coff*)              fmt=coff em=linux ;;
241        i386-*-linux-gnu*)               fmt=elf em=linux ;;
242 +      i386-*-linux-uclibc*)            fmt=elf em=linux ;;
243        x86_64-*-linux-gnu*)             fmt=elf em=linux ;;
244 +      x86_64-*-linux-uclibc*)          fmt=elf em=linux ;;
245        i386-*-lynxos*)                  fmt=elf em=lynx bfd_gas=yes ;;
246        i386-*-sysv[45]*)                        fmt=elf ;;
247        i386-*-solaris*)                 fmt=elf ;;
248 @@ -4379,6 +4389,7 @@
249        ia64-*-elf*)                     fmt=elf ;;
250        ia64-*-aix*)                     fmt=elf em=ia64aix ;;
251        ia64-*-linux-gnu*)               fmt=elf em=linux ;;
252 +      ia64-*-linux-uclibc*)            fmt=elf em=linux ;;
253        ia64-*-hpux*)                    fmt=elf em=hpux ;;
254        ia64-*-netbsd*)                  fmt=elf em=nbsd ;;
255  
256 @@ -4406,6 +4417,7 @@
257        m68k-*-hpux*)                    fmt=hp300 em=hp300 ;;
258        m68k-*-linux*aout*)              fmt=aout em=linux ;;
259        m68k-*-linux-gnu*)               fmt=elf em=linux ;;
260 +      m68k-*-linux-uclibc*)            fmt=elf em=linux ;;
261        m68k-*-uclinux*)                 fmt=elf ;;
262        m68k-*-gnu*)                     fmt=elf ;;
263        m68k-*-lynxos*)                  fmt=coff em=lynx ;;
264 @@ -4468,7 +4480,7 @@
265        ppc-*-beos*)                     fmt=coff ;;
266        ppc-*-*n*bsd* | ppc-*-elf*)      fmt=elf ;;
267        ppc-*-eabi* | ppc-*-sysv4*)      fmt=elf ;;
268 -      ppc-*-linux-gnu*)                        fmt=elf em=linux
269 +      ppc-*-linux-uclibc* | ppc-*-linux-gnu*)                  fmt=elf em=linux
270             case "$endian" in
271                 big)  ;;
272                 *)    { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5
273 @@ -4496,7 +4508,9 @@
274        ppc-*-lynxos*)                   fmt=elf em=lynx bfd_gas=yes ;;
275  
276        s390x-*-linux-gnu*)              fmt=elf em=linux ;;
277 +      s390x-*-linux-uclibc*)           fmt=elf em=linux ;;
278        s390-*-linux-gnu*)               fmt=elf em=linux ;;
279 +      s390-*-linux-uclibc*)            fmt=elf em=linux ;;
280  
281        sh*-*-linux*)                    fmt=elf em=linux
282             case ${cpu} in
283 @@ -4529,6 +4543,7 @@
284        sparc-*-coff)                    fmt=coff ;;
285        sparc-*-linux*aout*)             fmt=aout em=linux ;;
286        sparc-*-linux-gnu*)              fmt=elf em=linux ;;
287 +      sparc-*-linux-uclibc*)           fmt=elf em=linux ;;
288        sparc-*-lynxos*)                 fmt=coff em=lynx ;;
289        sparc-fujitsu-none)              fmt=aout ;;
290        sparc-*-elf)                     fmt=elf ;;
291 --- binutils-2.15.91.0.1/gas/configure.in~binutils-2.15.90.0.3-uclibc-100-conf
292 +++ binutils-2.15.91.0.1/gas/configure.in
293 @@ -194,6 +194,7 @@
294        alpha*-*-osf*)                   fmt=ecoff ;;
295        alpha*-*-linuxecoff*)            fmt=ecoff ;;
296        alpha*-*-linux-gnu*)             fmt=elf em=linux ;;
297 +      alpha*-*-linux-uclibc*)          fmt=elf em=linux ;;
298        alpha*-*-netbsd*)                        fmt=elf em=nbsd ;;
299        alpha*-*-openbsd*)               fmt=elf em=obsd ;;
300  
301 @@ -210,6 +211,7 @@
302        arm*-*-conix*)                   fmt=elf ;;
303        arm-*-linux*aout*)               fmt=aout em=linux ;;
304        arm*-*-linux-gnu*)               fmt=elf  em=linux ;;
305 +      arm*-*-linux-uclibc*)            fmt=elf  em=linux ;;
306        arm*-*-uclinux*)                 fmt=elf  em=linux ;;
307        arm-*-netbsdelf*)                 fmt=elf  em=nbsd ;;
308        arm-*-*n*bsd*)                   fmt=aout em=nbsd ;;
309 @@ -223,6 +225,7 @@
310        avr-*-*)                         fmt=elf ;;
311  
312        cris-*-linux-gnu*)               fmt=multi bfd_gas=yes em=linux ;;
313 +      cris-*-linux-uclibc*)            fmt=multi bfd_gas=yes em=linux ;;
314        cris-*-*)                                fmt=multi bfd_gas=yes ;;
315  
316        d10v-*-*)                                fmt=elf ;;
317 @@ -280,7 +283,9 @@
318        i386-*-linux*oldld)              fmt=aout em=linux ;;
319        i386-*-linux*coff*)              fmt=coff em=linux ;;
320        i386-*-linux-gnu*)               fmt=elf em=linux ;;
321 +      i386-*-linux-uclibc*)            fmt=elf em=linux ;;
322        x86_64-*-linux-gnu*)             fmt=elf em=linux ;;
323 +      x86_64-*-linux-uclibc*)          fmt=elf em=linux ;;
324        i386-*-lynxos*)                  fmt=elf em=lynx bfd_gas=yes ;;
325  changequote(,)dnl
326        i386-*-sysv[45]*)                        fmt=elf ;;
327 @@ -333,6 +338,7 @@
328        ia64-*-elf*)                     fmt=elf ;;
329        ia64-*-aix*)                     fmt=elf em=ia64aix ;;
330        ia64-*-linux-gnu*)               fmt=elf em=linux ;;
331 +      ia64-*-linux-uclibc*)            fmt=elf em=linux ;;
332        ia64-*-hpux*)                    fmt=elf em=hpux ;;
333        ia64-*-netbsd*)                  fmt=elf em=nbsd ;;
334  
335 @@ -360,6 +366,7 @@
336        m68k-*-hpux*)                    fmt=hp300 em=hp300 ;;
337        m68k-*-linux*aout*)              fmt=aout em=linux ;;
338        m68k-*-linux-gnu*)               fmt=elf em=linux ;;
339 +      m68k-*-linux-uclibc*)            fmt=elf em=linux ;;
340        m68k-*-uclinux*)                 fmt=elf ;;
341        m68k-*-gnu*)                     fmt=elf ;;
342        m68k-*-lynxos*)                  fmt=coff em=lynx ;;
343 @@ -419,7 +426,7 @@
344        ppc-*-beos*)                     fmt=coff ;;
345        ppc-*-*n*bsd* | ppc-*-elf*)      fmt=elf ;;
346        ppc-*-eabi* | ppc-*-sysv4*)      fmt=elf ;;
347 -      ppc-*-linux-gnu*)                        fmt=elf em=linux
348 +      ppc-*-linux-uclibc* | ppc-*-linux-gnu*)                  fmt=elf em=linux
349             case "$endian" in
350                 big)  ;;
351                 *)    AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
352 @@ -440,7 +447,9 @@
353        ppc-*-lynxos*)                   fmt=elf em=lynx bfd_gas=yes ;;
354  
355        s390x-*-linux-gnu*)              fmt=elf em=linux ;;
356 +      s390x-*-linux-uclibc*)           fmt=elf em=linux ;;
357        s390-*-linux-gnu*)               fmt=elf em=linux ;;
358 +      s390-*-linux-uclibc*)            fmt=elf em=linux ;;
359  
360        sh*-*-linux*)                    fmt=elf em=linux
361             case ${cpu} in
362 @@ -473,6 +482,7 @@
363        sparc-*-coff)                    fmt=coff ;;
364        sparc-*-linux*aout*)             fmt=aout em=linux ;;
365        sparc-*-linux-gnu*)              fmt=elf em=linux ;;
366 +      sparc-*-linux-uclibc*)           fmt=elf em=linux ;;
367        sparc-*-lynxos*)                 fmt=coff em=lynx ;;
368        sparc-fujitsu-none)              fmt=aout ;;
369        sparc-*-elf)                     fmt=elf ;;
370 --- binutils-2.15.91.0.1/ld/configure~binutils-2.15.90.0.3-uclibc-100-conf
371 +++ binutils-2.15.91.0.1/ld/configure
372 @@ -1578,6 +1578,11 @@
373    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
374    ;;
375  
376 +linux-uclibc*)
377 +  lt_cv_deplibs_check_method=pass_all
378 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
379 +  ;;
380 +
381  netbsd*)
382    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
383      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
384 --- binutils-2.15.91.0.1/ld/configure.tgt~binutils-2.15.90.0.3-uclibc-100-conf
385 +++ binutils-2.15.91.0.1/ld/configure.tgt
386 @@ -31,6 +31,7 @@
387                         targ_extra_emuls="criself crislinux"
388                         targ_extra_libpath=$targ_extra_emuls ;;
389  cris-*-linux-gnu*)     targ_emul=crislinux ;;
390 +cris-*-linux-uclibc*)  targ_emul=crislinux ;;
391  cris-*-*)              targ_emul=criself
392                         targ_extra_emuls="crisaout crislinux"
393                         targ_extra_libpath=$targ_extra_emuls ;;
394 @@ -60,14 +61,16 @@
395                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
396                         tdir_sun4=sparc-sun-sunos4
397                         ;;
398 -sparc64-*-linux-gnu*)  targ_emul=elf64_sparc
399 +sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)         \
400 +                       targ_emul=elf64_sparc
401                         targ_extra_emuls="elf32_sparc sparclinux sun4"
402                         targ_extra_libpath=elf32_sparc
403                         tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
404                         tdir_sparclinux=${tdir_elf32_sparc}aout
405                         tdir_sun4=sparc-sun-sunos4
406                         ;;
407 -sparc*-*-linux-gnu*)   targ_emul=elf32_sparc
408 +sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \
409 +                       targ_emul=elf32_sparc
410                         targ_extra_emuls="sparclinux elf64_sparc sun4"
411                         targ_extra_libpath=elf64_sparc
412                         tdir_sparclinux=${targ_alias}aout
413 @@ -129,7 +132,7 @@
414  m68*-ericsson-ose)     targ_emul=sun3 ;;
415  m68*-apple-aux*)       targ_emul=m68kaux ;;
416  *-tandem-none)         targ_emul=st2000 ;;
417 -i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
418 +i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;;
419  i[3-7]86-*-nto-qnx*)   targ_emul=i386nto ;;
420  i[3-7]86-*-vsta)       targ_emul=vsta ;;
421  i[3-7]86-go32-rtems*)  targ_emul=i386go32 ;;
422 @@ -153,14 +156,16 @@
423                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
424                         ;;
425  i[3-7]86-*-linux*oldld)        targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
426 -i[3-7]86-*-linux-gnu*) targ_emul=elf_i386
427 +i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \
428 +                       targ_emul=elf_i386
429                         targ_extra_emuls=i386linux
430                         if test x${want64} = xtrue; then
431                           targ_extra_emuls="$targ_extra_emuls elf_x86_64"
432                         fi
433                         tdir_i386linux=${targ_alias}aout
434                         ;;
435 -x86_64-*-linux-gnu*)   targ_emul=elf_x86_64
436 +x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \
437 +                       targ_emul=elf_x86_64
438                         targ_extra_emuls="elf_i386 i386linux"
439                         targ_extra_libpath=elf_i386
440                         tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
441 @@ -260,10 +265,13 @@
442  arm9e-*-elf)           targ_emul=armelf ;;
443  arm-*-oabi)            targ_emul=armelf_oabi ;;
444  arm*b-*-linux-gnu*)    targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
445 +arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
446  arm*-*-linux-gnu*)     targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
447 +arm*-*-linux-uclibc*)  targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
448  arm*-*-uclinux*)       targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
449  arm*-*-conix*)         targ_emul=armelf ;;
450 -thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
451 +thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \
452 +                       targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
453  strongarm-*-coff)      targ_emul=armcoff ;;
454  strongarm-*-elf)       targ_emul=armelf ;;
455  strongarm-*-kaos*)     targ_emul=armelf ;;
456 @@ -365,7 +373,8 @@
457                         targ_extra_emuls=m68kelf
458                         tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
459                         ;;
460 -m68k-*-linux-gnu*)     targ_emul=m68kelf
461 +m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \
462 +                       targ_emul=m68kelf
463                         targ_extra_emuls=m68klinux
464                         tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
465                         ;;
466 @@ -382,9 +391,9 @@
467  m68*-*-psos*)          targ_emul=m68kpsos ;;
468  m68*-*-rtemscoff*)     targ_emul=m68kcoff ;;
469  m68*-*-rtems*)         targ_emul=m68kelf ;;
470 -hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
471 +hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)  targ_emul=hppa64linux ;;
472  hppa*64*-*)            targ_emul=elf64hppa ;;
473 -hppa*-*-linux-gnu*)    targ_emul=hppalinux ;;
474 +hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*)    targ_emul=hppalinux ;;
475  hppa*-*-*elf*)         targ_emul=hppaelf ;;
476  hppa*-*-lites*)                targ_emul=hppaelf ;;
477  hppa*-*-netbsd*)       targ_emul=hppanbsd ;;
478 @@ -430,16 +439,20 @@
479  mips*-*-vxworks*)      targ_emul=elf32ebmip
480                         targ_extra_emuls="elf32elmip" ;;
481  mips*-*-windiss)       targ_emul=elf32mipswindiss ;;
482 -mips64*el-*-linux-gnu*)        targ_emul=elf32ltsmipn32
483 +mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*)
484 +                       targ_emul=elf32ltsmipn32
485                         targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
486                         ;;
487 -mips64*-*-linux-gnu*)  targ_emul=elf32btsmipn32
488 +mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*)
489 +                       targ_emul=elf32btsmipn32
490                         targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
491                         ;;
492 -mips*el-*-linux-gnu*)  targ_emul=elf32ltsmip
493 +mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*)
494 +                       targ_emul=elf32ltsmip
495                         targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
496                         ;;
497 -mips*-*-linux-gnu*)    targ_emul=elf32btsmip
498 +mips*-*-linux-gnu* | mips*-*-linux-uclibc*)
499 +                       targ_emul=elf32btsmip
500                         targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
501                         ;;
502  mips*-*-lnews*)                targ_emul=mipslnews ;;
503 @@ -462,6 +475,10 @@
504  alpha*-*-linux-gnu*)   targ_emul=elf64alpha targ_extra_emuls=alpha
505                         tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
506                         ;;
507 +alpha*-*-linux-uclibc*)        targ_emul=elf64alpha targ_extra_emuls=alpha
508 +                       # The following needs to be checked...
509 +                       tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
510 +                       ;;
511  alpha*-*-osf*)         targ_emul=alpha ;;
512  alpha*-*-gnu*)         targ_emul=elf64alpha ;;
513  alpha*-*-netware*)     targ_emul=alpha ;;
514 --- binutils-2.15.91.0.1/configure~binutils-2.15.90.0.3-uclibc-100-conf
515 +++ binutils-2.15.91.0.1/configure
516 @@ -1365,6 +1365,18 @@
517    i[3456789]86-*-coff | i[3456789]86-*-elf)
518      noconfigdirs="$noconfigdirs ${libgcj}"
519      ;;
520 +  i[3456789]86-*-linux-uclibc)
521 +    # This section makes it possible to build newlib natively on linux.
522 +    # If we are using a cross compiler then don't configure newlib.
523 +    if test x${is_cross_compiler} != xno ; then
524 +      noconfigdirs="$noconfigdirs target-newlib"
525 +    fi
526 +    noconfigdirs="$noconfigdirs target-libgloss"
527 +    # If we are not using a cross compiler, do configure newlib.
528 +    # Note however, that newlib will only be configured in this situation
529 +    # if the --with-newlib option has been given, because otherwise
530 +    # 'target-newlib' will appear in skipdirs.
531 +    ;;
532    i[3456789]86-*-linux*)
533      # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
534      # not build java stuff by default.
535 --- binutils-2.15.91.0.1/configure.in~binutils-2.15.90.0.3-uclibc-100-conf
536 +++ binutils-2.15.91.0.1/configure.in
537 @@ -551,6 +551,19 @@
538    i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
539      noconfigdirs="$noconfigdirs ${libgcj}"
540      ;;
541 +  i[3456789]86-*-linux-uclibc)
542 +    # This section makes it possible to build newlib natively on linux.
543 +    # If we are using a cross compiler then don't configure newlib.
544 +    if test x${is_cross_compiler} != xno ; then
545 +      noconfigdirs="$noconfigdirs target-newlib"
546 +    fi
547 +    noconfigdirs="$noconfigdirs target-libgloss"
548 +    build_modules=
549 +    # If we are not using a cross compiler, do configure newlib.
550 +    # Note however, that newlib will only be configured in this situation
551 +    # if the --with-newlib option has been given, because otherwise
552 +    # 'target-newlib' will appear in skipdirs.
553 +    ;;
554    i[[3456789]]86-*-linux*)
555      # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
556      # not build java stuff by default.
557 --- binutils-2.15.91.0.1/libtool.m4~binutils-2.15.90.0.3-uclibc-100-conf
558 +++ binutils-2.15.91.0.1/libtool.m4
559 @@ -645,6 +645,11 @@
560    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
561    ;;
562  
563 +linux-uclibc*)
564 +  lt_cv_deplibs_check_method=pass_all
565 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
566 +  ;;
567 +
568  netbsd*)
569    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
570      [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
571 --- binutils-2.15.91.0.1/ltconfig~binutils-2.15.90.0.3-uclibc-100-conf
572 +++ binutils-2.15.91.0.1/ltconfig
573 @@ -603,6 +603,7 @@
574  # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
575  case $host_os in
576  linux-gnu*) ;;
577 +linux-uclibc*) ;;
578  linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
579  esac
580  
581 @@ -1259,6 +1260,24 @@
582    dynamic_linker='GNU/Linux ld.so'
583    ;;
584  
585 +linux-uclibc*)
586 +  version_type=linux
587 +  need_lib_prefix=no
588 +  need_version=no
589 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
590 +  soname_spec='${libname}${release}.so$major'
591 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
592 +  shlibpath_var=LD_LIBRARY_PATH
593 +  shlibpath_overrides_runpath=no
594 +  # This implies no fast_install, which is unacceptable.
595 +  # Some rework will be needed to allow for fast_install
596 +  # before this can be enabled.
597 +  # Note: copied from linux-gnu, and may not be appropriate.
598 +  hardcode_into_libs=yes
599 +  # Assume using the uClibc dynamic linker.
600 +  dynamic_linker="uClibc ld.so"
601 +  ;;
602 +
603  netbsd*)
604    need_lib_prefix=no
605    need_version=no