1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/binutils/2.15/100-uclibc-conf.patch Sun May 27 20:22:06 2007 +0000
1.3 @@ -0,0 +1,692 @@
1.4 +diff -urN binutils-2.15-dist/bfd/config.bfd binutils-2.15/bfd/config.bfd
1.5 +--- binutils-2.15-dist/bfd/config.bfd 2004-05-17 14:35:56.000000000 -0500
1.6 ++++ binutils-2.15/bfd/config.bfd 2004-08-04 12:01:44.000000000 -0500
1.7 +@@ -126,7 +126,7 @@
1.8 + targ_defvec=ecoffalpha_little_vec
1.9 + targ_selvecs=bfd_elf64_alpha_vec
1.10 + ;;
1.11 +- alpha*-*-linux-gnu* | alpha*-*-elf*)
1.12 ++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
1.13 + targ_defvec=bfd_elf64_alpha_vec
1.14 + targ_selvecs=ecoffalpha_little_vec
1.15 + ;;
1.16 +@@ -136,7 +136,7 @@
1.17 + alpha*-*-*)
1.18 + targ_defvec=ecoffalpha_little_vec
1.19 + ;;
1.20 +- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
1.21 ++ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-linux-uclibc* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
1.22 + targ_defvec=bfd_elf64_ia64_little_vec
1.23 + targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
1.24 + ;;
1.25 +@@ -213,7 +213,7 @@
1.26 + targ_defvec=bfd_elf32_littlearm_vec
1.27 + targ_selvecs=bfd_elf32_bigarm_vec
1.28 + ;;
1.29 +- armeb-*-elf | arm*b-*-linux-gnu*)
1.30 ++ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
1.31 + targ_defvec=bfd_elf32_bigarm_vec
1.32 + targ_selvecs=bfd_elf32_littlearm_vec
1.33 + ;;
1.34 +@@ -221,7 +221,7 @@
1.35 + targ_defvec=bfd_elf32_littlearm_vec
1.36 + targ_selvecs=bfd_elf32_bigarm_vec
1.37 + ;;
1.38 +- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
1.39 ++ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | arm*-*-conix* | \
1.40 + arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
1.41 + targ_defvec=bfd_elf32_littlearm_vec
1.42 + targ_selvecs=bfd_elf32_bigarm_vec
1.43 +@@ -360,7 +360,7 @@
1.44 + ;;
1.45 +
1.46 + #ifdef BFD64
1.47 +- hppa*64*-*-linux-gnu*)
1.48 ++ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
1.49 + targ_defvec=bfd_elf64_hppa_linux_vec
1.50 + targ_selvecs=bfd_elf64_hppa_vec
1.51 + ;;
1.52 +@@ -371,7 +371,7 @@
1.53 + ;;
1.54 + #endif
1.55 +
1.56 +- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
1.57 ++ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc* | hppa*-*-netbsd*)
1.58 + targ_defvec=bfd_elf32_hppa_linux_vec
1.59 + targ_selvecs=bfd_elf32_hppa_vec
1.60 + ;;
1.61 +@@ -494,7 +494,7 @@
1.62 + targ_selvecs=bfd_elf32_i386_vec
1.63 + targ_underscore=yes
1.64 + ;;
1.65 +- i[3-7]86-*-linux-gnu*)
1.66 ++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
1.67 + targ_defvec=bfd_elf32_i386_vec
1.68 + targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
1.69 + targ64_selvecs=bfd_elf64_x86_64_vec
1.70 +@@ -508,7 +508,7 @@
1.71 + targ_defvec=bfd_elf64_x86_64_vec
1.72 + targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
1.73 + ;;
1.74 +- x86_64-*-linux-gnu*)
1.75 ++ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
1.76 + targ_defvec=bfd_elf64_x86_64_vec
1.77 + targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
1.78 + ;;
1.79 +@@ -683,7 +683,7 @@
1.80 + targ_selvecs=bfd_elf32_m68k_vec
1.81 + targ_underscore=yes
1.82 + ;;
1.83 +- m68*-*-linux-gnu*)
1.84 ++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
1.85 + targ_defvec=bfd_elf32_m68k_vec
1.86 + targ_selvecs=m68klinux_vec
1.87 + ;;
1.88 +@@ -955,7 +955,8 @@
1.89 + ;;
1.90 + #endif
1.91 + powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
1.92 +- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
1.93 ++ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
1.94 ++ powerpc-*-rtems* | \
1.95 + powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
1.96 + targ_defvec=bfd_elf32_powerpc_vec
1.97 + targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
1.98 +@@ -987,8 +988,8 @@
1.99 + targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
1.100 + ;;
1.101 + powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
1.102 +- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
1.103 +- powerpcle-*-rtems*)
1.104 ++ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
1.105 ++ powerpcle-*-vxworks* | powerpcle-*-rtems*)
1.106 + targ_defvec=bfd_elf32_powerpcle_vec
1.107 + targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
1.108 + targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
1.109 +@@ -1149,7 +1150,7 @@
1.110 + targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
1.111 + targ_underscore=yes
1.112 + ;;
1.113 +- sparc-*-linux-gnu*)
1.114 ++ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
1.115 + targ_defvec=bfd_elf32_sparc_vec
1.116 + targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
1.117 + ;;
1.118 +@@ -1196,7 +1197,7 @@
1.119 + targ_defvec=sunos_big_vec
1.120 + targ_underscore=yes
1.121 + ;;
1.122 +- sparc64-*-linux-gnu*)
1.123 ++ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
1.124 + targ_defvec=bfd_elf64_sparc_vec
1.125 + targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
1.126 + ;;
1.127 +@@ -1265,7 +1266,7 @@
1.128 + targ_underscore=yes
1.129 + ;;
1.130 +
1.131 +- vax-*-linux-gnu*)
1.132 ++ vax-*-linux-gnu* | vax-*-linux-uclibc*)
1.133 + targ_defvec=bfd_elf32_vax_vec
1.134 + ;;
1.135 +
1.136 +diff -urN binutils-2.15-dist/bfd/configure binutils-2.15/bfd/configure
1.137 +--- binutils-2.15-dist/bfd/configure 2004-05-17 14:35:57.000000000 -0500
1.138 ++++ binutils-2.15/bfd/configure 2004-08-04 12:01:44.000000000 -0500
1.139 +@@ -1699,6 +1699,11 @@
1.140 + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1.141 + ;;
1.142 +
1.143 ++linux-uclibc*)
1.144 ++ lt_cv_deplibs_check_method=pass_all
1.145 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.146 ++ ;;
1.147 ++
1.148 + netbsd*)
1.149 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.150 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.151 +@@ -5278,7 +5283,7 @@
1.152 + alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
1.153 + COREFILE=''
1.154 + ;;
1.155 +- alpha*-*-linux-gnu*)
1.156 ++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
1.157 + COREFILE=trad-core.lo
1.158 + TRAD_HEADER='"hosts/alphalinux.h"'
1.159 + ;;
1.160 +@@ -5338,7 +5343,7 @@
1.161 + COREFILE=trad-core.lo
1.162 + TRAD_HEADER='"hosts/i386mach3.h"'
1.163 + ;;
1.164 +- i[3-7]86-*-linux-gnu*)
1.165 ++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
1.166 + COREFILE=trad-core.lo
1.167 + TRAD_HEADER='"hosts/i386linux.h"'
1.168 + ;;
1.169 +@@ -5376,7 +5381,7 @@
1.170 + COREFILE=trad-core.lo
1.171 + TRAD_HEADER='"hosts/hp300bsd.h"'
1.172 + ;;
1.173 +- m68*-*-linux-gnu*)
1.174 ++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
1.175 + COREFILE=trad-core.lo
1.176 + TRAD_HEADER='"hosts/m68klinux.h"'
1.177 + ;;
1.178 +@@ -5477,7 +5482,7 @@
1.179 + COREFILE=trad-core.lo
1.180 + TRAD_HEADER='"hosts/vaxult2.h"'
1.181 + ;;
1.182 +- vax-*-linux-gnu*)
1.183 ++ vax-*-linux-gnu* | vax-*-linux-uclibc*)
1.184 + COREFILE=trad-core.lo
1.185 + TRAD_HEADER='"hosts/vaxlinux.h"'
1.186 + ;;
1.187 +diff -urN binutils-2.15-dist/bfd/configure.in binutils-2.15/bfd/configure.in
1.188 +--- binutils-2.15-dist/bfd/configure.in 2004-05-17 14:35:57.000000000 -0500
1.189 ++++ binutils-2.15/bfd/configure.in 2004-08-04 12:01:44.000000000 -0500
1.190 +@@ -178,7 +178,7 @@
1.191 + alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
1.192 + COREFILE=''
1.193 + ;;
1.194 +- alpha*-*-linux-gnu*)
1.195 ++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
1.196 + COREFILE=trad-core.lo
1.197 + TRAD_HEADER='"hosts/alphalinux.h"'
1.198 + ;;
1.199 +@@ -259,7 +259,7 @@
1.200 + TRAD_HEADER='"hosts/i386mach3.h"'
1.201 + ;;
1.202 + changequote(,)dnl
1.203 +- i[3-7]86-*-linux-gnu*)
1.204 ++ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
1.205 + changequote([,])dnl
1.206 + COREFILE=trad-core.lo
1.207 + TRAD_HEADER='"hosts/i386linux.h"'
1.208 +@@ -300,7 +300,7 @@
1.209 + COREFILE=trad-core.lo
1.210 + TRAD_HEADER='"hosts/hp300bsd.h"'
1.211 + ;;
1.212 +- m68*-*-linux-gnu*)
1.213 ++ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
1.214 + COREFILE=trad-core.lo
1.215 + TRAD_HEADER='"hosts/m68klinux.h"'
1.216 + ;;
1.217 +@@ -385,7 +385,7 @@
1.218 + COREFILE=trad-core.lo
1.219 + TRAD_HEADER='"hosts/vaxult2.h"'
1.220 + ;;
1.221 +- vax-*-linux-gnu*)
1.222 ++ vax-*-linux-gnu* | vax-*-linux-uclibc*)
1.223 + COREFILE=trad-core.lo
1.224 + TRAD_HEADER='"hosts/vaxlinux.h"'
1.225 + ;;
1.226 +diff -urN binutils-2.15-dist/binutils/configure binutils-2.15/binutils/configure
1.227 +--- binutils-2.15-dist/binutils/configure 2004-01-02 11:08:04.000000000 -0600
1.228 ++++ binutils-2.15/binutils/configure 2004-08-04 12:01:44.000000000 -0500
1.229 +@@ -1585,6 +1585,11 @@
1.230 + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1.231 + ;;
1.232 +
1.233 ++linux-uclibc*)
1.234 ++ lt_cv_deplibs_check_method=pass_all
1.235 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.236 ++ ;;
1.237 ++
1.238 + netbsd*)
1.239 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.240 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.241 +diff -urN binutils-2.15-dist/configure binutils-2.15/configure
1.242 +--- binutils-2.15-dist/configure 2004-05-17 14:36:20.000000000 -0500
1.243 ++++ binutils-2.15/configure 2004-08-04 12:01:44.000000000 -0500
1.244 +@@ -1288,6 +1288,18 @@
1.245 + i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
1.246 + noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1.247 + ;;
1.248 ++ i[3456789]86-*-linux-uclibc*)
1.249 ++ # This section makes it possible to build newlib natively on linux.
1.250 ++ # If we are using a cross compiler then don't configure newlib.
1.251 ++ if test x${is_cross_compiler} != xno ; then
1.252 ++ noconfigdirs="$noconfigdirs target-newlib"
1.253 ++ fi
1.254 ++ noconfigdirs="$noconfigdirs target-libgloss"
1.255 ++ # If we are not using a cross compiler, do configure newlib.
1.256 ++ # Note however, that newlib will only be configured in this situation
1.257 ++ # if the --with-newlib option has been given, because otherwise
1.258 ++ # 'target-newlib' will appear in skipdirs.
1.259 ++ ;;
1.260 + i[3456789]86-*-linux*)
1.261 + # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1.262 + # not build java stuff by default.
1.263 +diff -urN binutils-2.15-dist/configure.in binutils-2.15/configure.in
1.264 +--- binutils-2.15-dist/configure.in 2004-05-17 14:40:54.000000000 -0500
1.265 ++++ binutils-2.15/configure.in 2004-08-04 12:01:44.000000000 -0500
1.266 +@@ -521,6 +521,18 @@
1.267 + i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
1.268 + noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1.269 + ;;
1.270 ++ i[[3456789]]86-*-linux-uclibc*)
1.271 ++ # This section makes it possible to build newlib natively on linux.
1.272 ++ # If we are using a cross compiler then don't configure newlib.
1.273 ++ if test x${is_cross_compiler} != xno ; then
1.274 ++ noconfigdirs="$noconfigdirs target-newlib"
1.275 ++ fi
1.276 ++ noconfigdirs="$noconfigdirs target-libgloss"
1.277 ++ # If we are not using a cross compiler, do configure newlib.
1.278 ++ # Note however, that newlib will only be configured in this situation
1.279 ++ # if the --with-newlib option has been given, because otherwise
1.280 ++ # 'target-newlib' will appear in skipdirs.
1.281 ++ ;;
1.282 + i[[3456789]]86-*-linux*)
1.283 + # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1.284 + # not build java stuff by default.
1.285 +diff -urN binutils-2.15-dist/gas/configure binutils-2.15/gas/configure
1.286 +--- binutils-2.15-dist/gas/configure 2004-05-17 14:36:07.000000000 -0500
1.287 ++++ binutils-2.15/gas/configure 2004-08-04 12:07:50.000000000 -0500
1.288 +@@ -3400,6 +3400,11 @@
1.289 + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1.290 + ;;
1.291 +
1.292 ++linux-uclibc*)
1.293 ++ lt_cv_deplibs_check_method=pass_all
1.294 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.295 ++ ;;
1.296 ++
1.297 + netbsd*)
1.298 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.299 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.300 +@@ -4224,6 +4229,7 @@
1.301 + alpha*-*-osf*) fmt=ecoff ;;
1.302 + alpha*-*-linuxecoff*) fmt=ecoff ;;
1.303 + alpha*-*-linux-gnu*) fmt=elf em=linux ;;
1.304 ++ alpha*-*-linux-uclibc*) fmt=elf em=linux ;;
1.305 + alpha*-*-netbsd*) fmt=elf em=nbsd ;;
1.306 + alpha*-*-openbsd*) fmt=elf em=obsd ;;
1.307 +
1.308 +@@ -4240,6 +4246,7 @@
1.309 + arm*-*-conix*) fmt=elf ;;
1.310 + arm-*-linux*aout*) fmt=aout em=linux ;;
1.311 + arm*-*-linux-gnu*) fmt=elf em=linux ;;
1.312 ++ arm*-*-linux-uclibc*) fmt=elf em=linux ;;
1.313 + arm*-*-uclinux*) fmt=elf em=linux ;;
1.314 + arm-*-netbsdelf*) fmt=elf em=nbsd ;;
1.315 + arm-*-*n*bsd*) fmt=aout em=nbsd ;;
1.316 +@@ -4253,6 +4260,7 @@
1.317 + avr-*-*) fmt=elf ;;
1.318 +
1.319 + cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
1.320 ++ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;;
1.321 + cris-*-*) fmt=multi bfd_gas=yes ;;
1.322 +
1.323 + d10v-*-*) fmt=elf ;;
1.324 +@@ -4310,7 +4318,9 @@
1.325 + i386-*-linux*oldld) fmt=aout em=linux ;;
1.326 + i386-*-linux*coff*) fmt=coff em=linux ;;
1.327 + i386-*-linux-gnu*) fmt=elf em=linux ;;
1.328 ++ i386-*-linux-uclibc*) fmt=elf em=linux ;;
1.329 + x86_64-*-linux-gnu*) fmt=elf em=linux ;;
1.330 ++ x86_64-*-linux-uclibc*) fmt=elf em=linux ;;
1.331 + i386-*-lynxos*) fmt=coff em=lynx ;;
1.332 + i386-*-sysv[45]*) fmt=elf ;;
1.333 + i386-*-solaris*) fmt=elf ;;
1.334 +@@ -4370,6 +4380,7 @@
1.335 + ia64-*-elf*) fmt=elf ;;
1.336 + ia64-*-aix*) fmt=elf em=ia64aix ;;
1.337 + ia64-*-linux-gnu*) fmt=elf em=linux ;;
1.338 ++ ia64-*-linux-uclibc*) fmt=elf em=linux ;;
1.339 + ia64-*-hpux*) fmt=elf em=hpux ;;
1.340 + ia64-*-netbsd*) fmt=elf em=nbsd ;;
1.341 +
1.342 +@@ -4397,6 +4408,7 @@
1.343 + m68k-*-hpux*) fmt=hp300 em=hp300 ;;
1.344 + m68k-*-linux*aout*) fmt=aout em=linux ;;
1.345 + m68k-*-linux-gnu*) fmt=elf em=linux ;;
1.346 ++ m68k-*-linux-uclibc*) fmt=elf em=linux ;;
1.347 + m68k-*-uclinux*) fmt=elf ;;
1.348 + m68k-*-gnu*) fmt=elf ;;
1.349 + m68k-*-lynxos*) fmt=coff em=lynx ;;
1.350 +@@ -4459,6 +4471,7 @@
1.351 + ppc-*-beos*) fmt=coff ;;
1.352 + ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
1.353 + ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
1.354 ++ ppc-*-linux-uclibc* | \
1.355 + ppc-*-linux-gnu*) fmt=elf em=linux
1.356 + case "$endian" in
1.357 + big) ;;
1.358 +@@ -4486,7 +4499,9 @@
1.359 + ppc-*-kaos*) fmt=elf ;;
1.360 +
1.361 + s390x-*-linux-gnu*) fmt=elf em=linux ;;
1.362 ++ s390x-*-linux-uclibc*) fmt=elf em=linux ;;
1.363 + s390-*-linux-gnu*) fmt=elf em=linux ;;
1.364 ++ s390-*-linux-uclibc*) fmt=elf em=linux ;;
1.365 +
1.366 + sh*-*-linux*) fmt=elf em=linux
1.367 + case ${cpu} in
1.368 +@@ -4519,6 +4534,7 @@
1.369 + sparc-*-coff) fmt=coff ;;
1.370 + sparc-*-linux*aout*) fmt=aout em=linux ;;
1.371 + sparc-*-linux-gnu*) fmt=elf em=linux ;;
1.372 ++ sparc-*-linux-uclibc*) fmt=elf em=linux ;;
1.373 + sparc-*-lynxos*) fmt=coff em=lynx ;;
1.374 + sparc-fujitsu-none) fmt=aout ;;
1.375 + sparc-*-elf) fmt=elf ;;
1.376 +diff -urN binutils-2.15-dist/gas/configure.in binutils-2.15/gas/configure.in
1.377 +--- binutils-2.15-dist/gas/configure.in 2004-05-17 14:36:07.000000000 -0500
1.378 ++++ binutils-2.15/gas/configure.in 2004-08-04 12:07:21.000000000 -0500
1.379 +@@ -194,6 +194,7 @@
1.380 + alpha*-*-osf*) fmt=ecoff ;;
1.381 + alpha*-*-linuxecoff*) fmt=ecoff ;;
1.382 + alpha*-*-linux-gnu*) fmt=elf em=linux ;;
1.383 ++ alpha*-*-linux-uclibc*) fmt=elf em=linux ;;
1.384 + alpha*-*-netbsd*) fmt=elf em=nbsd ;;
1.385 + alpha*-*-openbsd*) fmt=elf em=obsd ;;
1.386 +
1.387 +@@ -210,6 +211,7 @@
1.388 + arm*-*-conix*) fmt=elf ;;
1.389 + arm-*-linux*aout*) fmt=aout em=linux ;;
1.390 + arm*-*-linux-gnu*) fmt=elf em=linux ;;
1.391 ++ arm*-*-linux-uclibc*) fmt=elf em=linux ;;
1.392 + arm*-*-uclinux*) fmt=elf em=linux ;;
1.393 + arm-*-netbsdelf*) fmt=elf em=nbsd ;;
1.394 + arm-*-*n*bsd*) fmt=aout em=nbsd ;;
1.395 +@@ -223,6 +225,7 @@
1.396 + avr-*-*) fmt=elf ;;
1.397 +
1.398 + cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
1.399 ++ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;;
1.400 + cris-*-*) fmt=multi bfd_gas=yes ;;
1.401 +
1.402 + d10v-*-*) fmt=elf ;;
1.403 +@@ -280,7 +283,9 @@
1.404 + i386-*-linux*oldld) fmt=aout em=linux ;;
1.405 + i386-*-linux*coff*) fmt=coff em=linux ;;
1.406 + i386-*-linux-gnu*) fmt=elf em=linux ;;
1.407 ++ i386-*-linux-uclibc*) fmt=elf em=linux ;;
1.408 + x86_64-*-linux-gnu*) fmt=elf em=linux ;;
1.409 ++ x86_64-*-linux-uclibc*) fmt=elf em=linux ;;
1.410 + i386-*-lynxos*) fmt=coff em=lynx ;;
1.411 + changequote(,)dnl
1.412 + i386-*-sysv[45]*) fmt=elf ;;
1.413 +@@ -333,6 +338,7 @@
1.414 + ia64-*-elf*) fmt=elf ;;
1.415 + ia64-*-aix*) fmt=elf em=ia64aix ;;
1.416 + ia64-*-linux-gnu*) fmt=elf em=linux ;;
1.417 ++ ia64-*-linux-uclibc*) fmt=elf em=linux ;;
1.418 + ia64-*-hpux*) fmt=elf em=hpux ;;
1.419 + ia64-*-netbsd*) fmt=elf em=nbsd ;;
1.420 +
1.421 +@@ -360,6 +366,7 @@
1.422 + m68k-*-hpux*) fmt=hp300 em=hp300 ;;
1.423 + m68k-*-linux*aout*) fmt=aout em=linux ;;
1.424 + m68k-*-linux-gnu*) fmt=elf em=linux ;;
1.425 ++ m68k-*-linux-uclibc*) fmt=elf em=linux ;;
1.426 + m68k-*-uclinux*) fmt=elf ;;
1.427 + m68k-*-gnu*) fmt=elf ;;
1.428 + m68k-*-lynxos*) fmt=coff em=lynx ;;
1.429 +@@ -419,6 +426,7 @@
1.430 + ppc-*-beos*) fmt=coff ;;
1.431 + ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
1.432 + ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
1.433 ++ ppc-*-linux-uclibc* | \
1.434 + ppc-*-linux-gnu*) fmt=elf em=linux
1.435 + case "$endian" in
1.436 + big) ;;
1.437 +@@ -439,7 +447,9 @@
1.438 + ppc-*-kaos*) fmt=elf ;;
1.439 +
1.440 + s390x-*-linux-gnu*) fmt=elf em=linux ;;
1.441 ++ s390x-*-linux-uclibc*) fmt=elf em=linux ;;
1.442 + s390-*-linux-gnu*) fmt=elf em=linux ;;
1.443 ++ s390-*-linux-uclibc*) fmt=elf em=linux ;;
1.444 +
1.445 + sh*-*-linux*) fmt=elf em=linux
1.446 + case ${cpu} in
1.447 +@@ -472,6 +482,7 @@
1.448 + sparc-*-coff) fmt=coff ;;
1.449 + sparc-*-linux*aout*) fmt=aout em=linux ;;
1.450 + sparc-*-linux-gnu*) fmt=elf em=linux ;;
1.451 ++ sparc-*-linux-uclibc*) fmt=elf em=linux ;;
1.452 + sparc-*-lynxos*) fmt=coff em=lynx ;;
1.453 + sparc-fujitsu-none) fmt=aout ;;
1.454 + sparc-*-elf) fmt=elf ;;
1.455 +diff -urN binutils-2.15-dist/gprof/configure binutils-2.15/gprof/configure
1.456 +--- binutils-2.15-dist/gprof/configure 2003-08-26 12:19:19.000000000 -0500
1.457 ++++ binutils-2.15/gprof/configure 2004-08-04 12:01:45.000000000 -0500
1.458 +@@ -1581,6 +1581,11 @@
1.459 + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1.460 + ;;
1.461 +
1.462 ++linux-uclibc*)
1.463 ++ lt_cv_deplibs_check_method=pass_all
1.464 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.465 ++ ;;
1.466 ++
1.467 + netbsd*)
1.468 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.469 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.470 +diff -urN binutils-2.15-dist/ld/configure binutils-2.15/ld/configure
1.471 +--- binutils-2.15-dist/ld/configure 2003-04-24 07:36:07.000000000 -0500
1.472 ++++ binutils-2.15/ld/configure 2004-08-04 12:01:45.000000000 -0500
1.473 +@@ -1589,6 +1589,11 @@
1.474 + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1.475 + ;;
1.476 +
1.477 ++linux-uclibc*)
1.478 ++ lt_cv_deplibs_check_method=pass_all
1.479 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.480 ++ ;;
1.481 ++
1.482 + netbsd*)
1.483 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.484 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.485 +diff -urN binutils-2.15-dist/ld/configure.tgt binutils-2.15/ld/configure.tgt
1.486 +--- binutils-2.15-dist/ld/configure.tgt 2004-05-17 14:36:15.000000000 -0500
1.487 ++++ binutils-2.15/ld/configure.tgt 2004-08-04 12:01:45.000000000 -0500
1.488 +@@ -30,6 +30,7 @@
1.489 + targ_extra_emuls="criself crislinux"
1.490 + targ_extra_libpath=$targ_extra_emuls ;;
1.491 + cris-*-linux-gnu*) targ_emul=crislinux ;;
1.492 ++cris-*-linux-uclibc*) targ_emul=crislinux ;;
1.493 + cris-*-*) targ_emul=criself
1.494 + targ_extra_emuls="crisaout crislinux"
1.495 + targ_extra_libpath=$targ_extra_emuls ;;
1.496 +@@ -59,14 +60,16 @@
1.497 + tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
1.498 + tdir_sun4=sparc-sun-sunos4
1.499 + ;;
1.500 +-sparc64-*-linux-gnu*) targ_emul=elf64_sparc
1.501 ++sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) \
1.502 ++ targ_emul=elf64_sparc
1.503 + targ_extra_emuls="elf32_sparc sparclinux sun4"
1.504 + targ_extra_libpath=elf32_sparc
1.505 + tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
1.506 + tdir_sparclinux=${tdir_elf32_sparc}aout
1.507 + tdir_sun4=sparc-sun-sunos4
1.508 + ;;
1.509 +-sparc*-*-linux-gnu*) targ_emul=elf32_sparc
1.510 ++sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \
1.511 ++ targ_emul=elf32_sparc
1.512 + targ_extra_emuls="sparclinux elf64_sparc sun4"
1.513 + targ_extra_libpath=elf64_sparc
1.514 + tdir_sparclinux=${targ_alias}aout
1.515 +@@ -118,7 +121,9 @@
1.516 + m32r*le-*-elf*) targ_emul=m32rlelf ;;
1.517 + m32r*-*-elf*) targ_emul=m32relf ;;
1.518 + m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;;
1.519 ++m32r*le-*-linux-uclibc*) targ_emul=m32rlelf_linux ;;
1.520 + m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;;
1.521 ++m32r*-*-linux-uclibc*) targ_emul=m32relf_linux ;;
1.522 + m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
1.523 + targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
1.524 + m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
1.525 +@@ -128,7 +133,7 @@
1.526 + m68*-ericsson-ose) targ_emul=sun3 ;;
1.527 + m68*-apple-aux*) targ_emul=m68kaux ;;
1.528 + *-tandem-none) targ_emul=st2000 ;;
1.529 +-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
1.530 ++i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;;
1.531 + i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
1.532 + i[3-7]86-*-vsta) targ_emul=vsta ;;
1.533 + i[3-7]86-go32-rtems*) targ_emul=i386go32 ;;
1.534 +@@ -152,14 +157,16 @@
1.535 + tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
1.536 + ;;
1.537 + i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
1.538 +-i[3-7]86-*-linux-gnu*) targ_emul=elf_i386
1.539 ++i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \
1.540 ++ targ_emul=elf_i386
1.541 + targ_extra_emuls=i386linux
1.542 + if test x${want64} = xtrue; then
1.543 + targ_extra_emuls="$targ_extra_emuls elf_x86_64"
1.544 + fi
1.545 + tdir_i386linux=${targ_alias}aout
1.546 + ;;
1.547 +-x86_64-*-linux-gnu*) targ_emul=elf_x86_64
1.548 ++x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \
1.549 ++ targ_emul=elf_x86_64
1.550 + targ_extra_emuls="elf_i386 i386linux"
1.551 + targ_extra_libpath=elf_i386
1.552 + tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
1.553 +@@ -259,10 +266,13 @@
1.554 + arm9e-*-elf) targ_emul=armelf ;;
1.555 + arm-*-oabi) targ_emul=armelf_oabi ;;
1.556 + arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
1.557 ++arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
1.558 + arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
1.559 ++arm*-*-linux-uclibc*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
1.560 + arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
1.561 + arm*-*-conix*) targ_emul=armelf ;;
1.562 +-thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
1.563 ++thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \
1.564 ++ targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
1.565 + strongarm-*-coff) targ_emul=armcoff ;;
1.566 + strongarm-*-elf) targ_emul=armelf ;;
1.567 + strongarm-*-kaos*) targ_emul=armelf ;;
1.568 +@@ -364,7 +374,8 @@
1.569 + targ_extra_emuls=m68kelf
1.570 + tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
1.571 + ;;
1.572 +-m68k-*-linux-gnu*) targ_emul=m68kelf
1.573 ++m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \
1.574 ++ targ_emul=m68kelf
1.575 + targ_extra_emuls=m68klinux
1.576 + tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
1.577 + ;;
1.578 +@@ -381,9 +392,9 @@
1.579 + m68*-*-psos*) targ_emul=m68kpsos ;;
1.580 + m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
1.581 + m68*-*-rtems*) targ_emul=m68kelf ;;
1.582 +-hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
1.583 ++hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_emul=hppa64linux ;;
1.584 + hppa*64*-*) targ_emul=elf64hppa ;;
1.585 +-hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
1.586 ++hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) targ_emul=hppalinux ;;
1.587 + hppa*-*-*elf*) targ_emul=hppaelf ;;
1.588 + hppa*-*-lites*) targ_emul=hppaelf ;;
1.589 + hppa*-*-netbsd*) targ_emul=hppanbsd ;;
1.590 +@@ -396,6 +407,7 @@
1.591 + targ_emul=vaxnbsd
1.592 + targ_extra_emuls=elf32vax ;;
1.593 + vax-*-linux-gnu*) targ_emul=elf32vax ;;
1.594 ++vax-*-linux-uclibc*) targ_emul=elf32vax ;;
1.595 + mips*-*-pe) targ_emul=mipspe ;
1.596 + targ_extra_ofiles="deffilep.o pe-dll.o" ;;
1.597 + mips*-dec-ultrix*) targ_emul=mipslit ;;
1.598 +@@ -429,16 +441,16 @@
1.599 + mips*-*-vxworks*) targ_emul=elf32ebmip
1.600 + targ_extra_emuls="elf32elmip" ;;
1.601 + mips*-*-windiss) targ_emul=elf32mipswindiss ;;
1.602 +-mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
1.603 ++mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*) targ_emul=elf32ltsmipn32
1.604 + targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
1.605 + ;;
1.606 +-mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
1.607 ++mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*) targ_emul=elf32btsmipn32
1.608 + targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
1.609 + ;;
1.610 +-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
1.611 ++mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*) targ_emul=elf32ltsmip
1.612 + targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
1.613 + ;;
1.614 +-mips*-*-linux-gnu*) targ_emul=elf32btsmip
1.615 ++mips*-*-linux-gnu* | mips*-*-linux-uclibc*) targ_emul=elf32btsmip
1.616 + targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
1.617 + ;;
1.618 + mips*-*-lnews*) targ_emul=mipslnews ;;
1.619 +@@ -461,6 +473,10 @@
1.620 + alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
1.621 + tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
1.622 + ;;
1.623 ++alpha*-*-linux-uclibc*) targ_emul=elf64alpha targ_extra_emuls=alpha
1.624 ++ # The following needs to be checked...
1.625 ++ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
1.626 ++ ;;
1.627 + alpha*-*-osf*) targ_emul=alpha ;;
1.628 + alpha*-*-gnu*) targ_emul=elf64alpha ;;
1.629 + alpha*-*-netware*) targ_emul=alpha ;;
1.630 +diff -urN binutils-2.15-dist/libtool.m4 binutils-2.15/libtool.m4
1.631 +--- binutils-2.15-dist/libtool.m4 2003-04-10 22:58:39.000000000 -0500
1.632 ++++ binutils-2.15/libtool.m4 2004-08-04 12:01:45.000000000 -0500
1.633 +@@ -645,6 +645,11 @@
1.634 + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1.635 + ;;
1.636 +
1.637 ++linux-uclibc*)
1.638 ++ lt_cv_deplibs_check_method=pass_all
1.639 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.640 ++ ;;
1.641 ++
1.642 + netbsd*)
1.643 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.644 + [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
1.645 +diff -urN binutils-2.15-dist/ltconfig binutils-2.15/ltconfig
1.646 +--- binutils-2.15-dist/ltconfig 2003-10-03 23:54:47.000000000 -0500
1.647 ++++ binutils-2.15/ltconfig 2004-08-04 12:01:45.000000000 -0500
1.648 +@@ -603,6 +603,7 @@
1.649 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1.650 + case $host_os in
1.651 + linux-gnu*) ;;
1.652 ++linux-uclibc*) ;;
1.653 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1.654 + esac
1.655 +
1.656 +@@ -1259,6 +1260,24 @@
1.657 + dynamic_linker='GNU/Linux ld.so'
1.658 + ;;
1.659 +
1.660 ++linux-uclibc*)
1.661 ++ version_type=linux
1.662 ++ need_lib_prefix=no
1.663 ++ need_version=no
1.664 ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1.665 ++ soname_spec='${libname}${release}.so$major'
1.666 ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1.667 ++ shlibpath_var=LD_LIBRARY_PATH
1.668 ++ shlibpath_overrides_runpath=no
1.669 ++ # This implies no fast_install, which is unacceptable.
1.670 ++ # Some rework will be needed to allow for fast_install
1.671 ++ # before this can be enabled.
1.672 ++ # Note: copied from linux-gnu, and may not be appropriate.
1.673 ++ hardcode_into_libs=yes
1.674 ++ # Assume using the uClibc dynamic linker.
1.675 ++ dynamic_linker="uClibc ld.so"
1.676 ++ ;;
1.677 ++
1.678 + netbsd*)
1.679 + need_lib_prefix=no
1.680 + need_version=no
1.681 +diff -urN binutils-2.15-dist/opcodes/configure binutils-2.15/opcodes/configure
1.682 +--- binutils-2.15-dist/opcodes/configure 2003-08-05 04:39:31.000000000 -0500
1.683 ++++ binutils-2.15/opcodes/configure 2004-08-04 12:01:45.000000000 -0500
1.684 +@@ -1700,6 +1700,11 @@
1.685 + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1.686 + ;;
1.687 +
1.688 ++linux-uclibc*)
1.689 ++ lt_cv_deplibs_check_method=pass_all
1.690 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.691 ++ ;;
1.692 ++
1.693 + netbsd*)
1.694 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.695 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'