1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gcc/4.0.4/100-uclibc-conf.patch Sat May 19 13:10:11 2007 +0000
1.3 @@ -0,0 +1,553 @@
1.4 +--- gcc-4.0.2/gcc/config/t-linux-uclibc
1.5 ++++ gcc-4.0.2/gcc/config/t-linux-uclibc
1.6 +@@ -0,0 +1,5 @@
1.7 ++# Remove glibc specific files added in t-linux
1.8 ++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
1.9 ++
1.10 ++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
1.11 ++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
1.12 +--- gcc-4.0.2/gcc/config.gcc
1.13 ++++ gcc-4.0.2/gcc/config.gcc
1.14 +@@ -1778,7 +1778,7 @@
1.15 + ;;
1.16 + sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
1.17 + sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
1.18 +- sh-*-linux* | sh[346lbe]*-*-linux* | \
1.19 ++ sh*-*-linux* | sh[346lbe]*-*-linux* | \
1.20 + sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
1.21 + sh64-*-netbsd* | sh64l*-*-netbsd*)
1.22 + tmake_file="${tmake_file} sh/t-sh sh/t-elf"
1.23 +@@ -2234,10 +2234,16 @@
1.24 + *)
1.25 + echo "*** Configuration ${target} not supported" 1>&2
1.26 + exit 1
1.27 + ;;
1.28 + esac
1.29 ++
1.30 ++# Rather than hook into each target, just do it after all the linux
1.31 ++# targets have been processed
1.32 ++case ${target} in
1.33 ++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
1.34 ++esac
1.35 +
1.36 + case ${target} in
1.37 + i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
1.38 + tmake_file="${tmake_file} i386/t-gmm_malloc"
1.39 + ;;
1.40 +--- gcc-4.0.2/gcc/config/alpha/linux-elf.h
1.41 ++++ gcc-4.0.2/gcc/config/alpha/linux-elf.h
1.42 +@@ -27,7 +27,11 @@
1.43 + #define SUBTARGET_EXTRA_SPECS \
1.44 + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
1.45 +
1.46 ++#ifdef USE_UCLIBC
1.47 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.48 ++#else
1.49 + #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
1.50 ++#endif
1.51 +
1.52 + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
1.53 + %{O*:-O3} %{!O*:-O1} \
1.54 +--- gcc-4.0.2/gcc/config/arm/linux-elf.h
1.55 ++++ gcc-4.0.2/gcc/config/arm/linux-elf.h
1.56 +@@ -81,14 +81,19 @@
1.57 + #define ENDFILE_SPEC \
1.58 + "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
1.59 +
1.60 ++#ifdef USE_UCLIBC
1.61 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.62 ++#else
1.63 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
1.64 ++#endif
1.65 + #undef LINK_SPEC
1.66 + #define LINK_SPEC "%{h*} %{version:-v} \
1.67 + %{b} %{Wl,*:%*} \
1.68 + %{static:-Bstatic} \
1.69 + %{shared:-shared} \
1.70 + %{symbolic:-Bsymbolic} \
1.71 + %{rdynamic:-export-dynamic} \
1.72 +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
1.73 ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
1.74 + -X \
1.75 + %{mbig-endian:-EB}" \
1.76 + SUBTARGET_EXTRA_LINK_SPEC
1.77 +--- gcc-4.0.2/gcc/config/cris/linux.h
1.78 ++++ gcc-4.0.2/gcc/config/cris/linux.h
1.79 +@@ -79,6 +79,25 @@
1.80 + #undef CRIS_DEFAULT_CPU_VERSION
1.81 + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
1.82 +
1.83 ++#ifdef USE_UCLIBC
1.84 ++
1.85 ++#undef CRIS_SUBTARGET_VERSION
1.86 ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
1.87 ++
1.88 ++#undef CRIS_LINK_SUBTARGET_SPEC
1.89 ++#define CRIS_LINK_SUBTARGET_SPEC \
1.90 ++ "-mcrislinux\
1.91 ++ -rpath-link include/asm/../..%s\
1.92 ++ %{shared} %{static}\
1.93 ++ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
1.94 ++ %{!shared: \
1.95 ++ %{!static: \
1.96 ++ %{rdynamic:-export-dynamic} \
1.97 ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
1.98 ++ %{!r:%{O2|O3: --gc-sections}}"
1.99 ++
1.100 ++#else /* USE_UCLIBC */
1.101 ++
1.102 + #undef CRIS_SUBTARGET_VERSION
1.103 + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
1.104 +
1.105 +@@ -93,6 +112,8 @@
1.106 + %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
1.107 + %{!r:%{O2|O3: --gc-sections}}"
1.108 +
1.109 ++#endif /* USE_UCLIBC */
1.110 ++
1.111 +
1.112 + /* Node: Run-time Target */
1.113 +
1.114 +--- gcc-4.0.2/gcc/config/i386/linux.h
1.115 ++++ gcc-4.0.2/gcc/config/i386/linux.h
1.116 +@@ -107,6 +107,11 @@
1.117 + #define LINK_EMULATION "elf_i386"
1.118 + #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
1.119 +
1.120 ++#ifdef USE_UCLIBC
1.121 ++#undef DYNAMIC_LINKER
1.122 ++#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.123 ++#endif
1.124 ++
1.125 + #undef SUBTARGET_EXTRA_SPECS
1.126 + #define SUBTARGET_EXTRA_SPECS \
1.127 + { "link_emulation", LINK_EMULATION },\
1.128 +--- gcc-4.0.2/gcc/config/i386/linux64.h
1.129 ++++ gcc-4.0.2/gcc/config/i386/linux64.h
1.130 +@@ -54,14 +54,21 @@
1.131 + When the -shared link option is used a final link is not being
1.132 + done. */
1.133 +
1.134 ++#ifdef USE_UCLIBC
1.135 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.136 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
1.137 ++#else
1.138 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
1.139 ++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
1.140 ++#endif
1.141 + #undef LINK_SPEC
1.142 + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
1.143 + %{shared:-shared} \
1.144 + %{!shared: \
1.145 + %{!static: \
1.146 + %{rdynamic:-export-dynamic} \
1.147 +- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
1.148 +- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
1.149 ++ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
1.150 ++ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
1.151 + %{static:-static}}"
1.152 +
1.153 + #define MULTILIB_DEFAULTS { "m64" }
1.154 +--- gcc-4.0.2/gcc/config/ia64/linux.h
1.155 ++++ gcc-4.0.2/gcc/config/ia64/linux.h
1.156 +@@ -37,13 +37,18 @@
1.157 + /* Define this for shared library support because it isn't in the main
1.158 + linux.h file. */
1.159 +
1.160 ++#ifdef USE_UCLIBC
1.161 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.162 ++#else
1.163 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
1.164 ++#endif
1.165 + #undef LINK_SPEC
1.166 + #define LINK_SPEC "\
1.167 + %{shared:-shared} \
1.168 + %{!shared: \
1.169 + %{!static: \
1.170 + %{rdynamic:-export-dynamic} \
1.171 +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
1.172 ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
1.173 + %{static:-static}}"
1.174 +
1.175 +
1.176 +--- gcc-4.0.2/gcc/config/m68k/linux.h
1.177 ++++ gcc-4.0.2/gcc/config/m68k/linux.h
1.178 +@@ -127,12 +127,17 @@
1.179 +
1.180 + /* If ELF is the default format, we should not use /lib/elf. */
1.181 +
1.182 ++#ifdef USE_UCLIBC
1.183 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.184 ++#else
1.185 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
1.186 ++#endif
1.187 + #undef LINK_SPEC
1.188 + #define LINK_SPEC "-m m68kelf %{shared} \
1.189 + %{!shared: \
1.190 + %{!static: \
1.191 + %{rdynamic:-export-dynamic} \
1.192 +- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
1.193 ++ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
1.194 + %{static}}"
1.195 +
1.196 + /* For compatibility with linux/a.out */
1.197 +--- gcc-4.0.2/gcc/config/mips/linux.h
1.198 ++++ gcc-4.0.2/gcc/config/mips/linux.h
1.199 +@@ -108,14 +108,19 @@
1.200 +
1.201 + /* Borrowed from sparc/linux.h */
1.202 + #undef LINK_SPEC
1.203 ++#ifdef USE_UCLIBC
1.204 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.205 ++#else
1.206 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
1.207 ++#endif
1.208 + #define LINK_SPEC \
1.209 + "%(endian_spec) \
1.210 + %{shared:-shared} \
1.211 + %{!shared: \
1.212 + %{!ibcs: \
1.213 + %{!static: \
1.214 + %{rdynamic:-export-dynamic} \
1.215 +- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
1.216 ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
1.217 + %{static:-static}}}"
1.218 +
1.219 + #undef SUBTARGET_ASM_SPEC
1.220 +--- gcc-4.0.2/gcc/config/pa/pa-linux.h
1.221 ++++ gcc-4.0.2/gcc/config/pa/pa-linux.h
1.222 +@@ -82,13 +82,18 @@
1.223 + /* Define this for shared library support because it isn't in the main
1.224 + linux.h file. */
1.225 +
1.226 ++#ifdef USE_UCLIBC
1.227 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.228 ++#else
1.229 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
1.230 ++#endif
1.231 + #undef LINK_SPEC
1.232 + #define LINK_SPEC "\
1.233 + %{shared:-shared} \
1.234 + %{!shared: \
1.235 + %{!static: \
1.236 + %{rdynamic:-export-dynamic} \
1.237 +- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
1.238 ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
1.239 + %{static:-static}}"
1.240 +
1.241 + /* glibc's profiling functions don't need gcc to allocate counters. */
1.242 +--- gcc-4.0.2/gcc/config/rs6000/linux.h
1.243 ++++ gcc-4.0.2/gcc/config/rs6000/linux.h
1.244 +@@ -69,7 +69,11 @@
1.245 + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
1.246 +
1.247 + #undef LINK_OS_DEFAULT_SPEC
1.248 ++#ifdef USE_UCLIBC
1.249 ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
1.250 ++#else
1.251 + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
1.252 ++#endif
1.253 +
1.254 + #define LINK_GCC_C_SEQUENCE_SPEC \
1.255 + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
1.256 +--- gcc-4.0.2/gcc/config/rs6000/sysv4.h
1.257 ++++ gcc-4.0.2/gcc/config/rs6000/sysv4.h
1.258 +@@ -949,6 +949,7 @@
1.259 + mcall-linux : %(link_os_linux) ; \
1.260 + mcall-gnu : %(link_os_gnu) ; \
1.261 + mcall-netbsd : %(link_os_netbsd) ; \
1.262 ++ mcall-linux-uclibc : %(link_os_linux_uclibc); \
1.263 + mcall-openbsd: %(link_os_openbsd) ; \
1.264 + : %(link_os_default) }"
1.265 +
1.266 +@@ -1127,6 +1128,10 @@
1.267 + %{rdynamic:-export-dynamic} \
1.268 + %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
1.269 +
1.270 ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
1.271 ++ %{rdynamic:-export-dynamic} \
1.272 ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
1.273 ++
1.274 + #if defined(HAVE_LD_EH_FRAME_HDR)
1.275 + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
1.276 + #endif
1.277 +@@ -1293,6 +1298,7 @@
1.278 + { "link_os_sim", LINK_OS_SIM_SPEC }, \
1.279 + { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
1.280 + { "link_os_linux", LINK_OS_LINUX_SPEC }, \
1.281 ++ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
1.282 + { "link_os_gnu", LINK_OS_GNU_SPEC }, \
1.283 + { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
1.284 + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
1.285 +--- gcc-4.0.2/gcc/config/s390/linux.h
1.286 ++++ gcc-4.0.2/gcc/config/s390/linux.h
1.287 +@@ -77,6 +77,13 @@
1.288 + #define MULTILIB_DEFAULTS { "m31" }
1.289 + #endif
1.290 +
1.291 ++#ifdef USE_UCLIBC
1.292 ++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.293 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
1.294 ++#else
1.295 ++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
1.296 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
1.297 ++#endif
1.298 + #undef LINK_SPEC
1.299 + #define LINK_SPEC \
1.300 + "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
1.301 +@@ -86,8 +93,8 @@
1.302 + %{!static: \
1.303 + %{rdynamic:-export-dynamic} \
1.304 + %{!dynamic-linker: \
1.305 +- %{m31:-dynamic-linker /lib/ld.so.1} \
1.306 +- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
1.307 ++ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
1.308 ++ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
1.309 +
1.310 +
1.311 + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
1.312 +--- gcc-4.0.2/gcc/config/sh/linux.h
1.313 ++++ gcc-4.0.2/gcc/config/sh/linux.h
1.314 +@@ -67,11 +67,16 @@
1.315 + #undef SUBTARGET_LINK_EMUL_SUFFIX
1.316 + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
1.317 + #undef SUBTARGET_LINK_SPEC
1.318 ++#ifdef USE_UCLIBC
1.319 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.320 ++#else
1.321 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
1.322 ++#endif
1.323 + #define SUBTARGET_LINK_SPEC \
1.324 + "%{shared:-shared} \
1.325 + %{!static: \
1.326 + %{rdynamic:-export-dynamic} \
1.327 +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
1.328 ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
1.329 + %{static:-static}"
1.330 +
1.331 + #undef LIB_SPEC
1.332 +--- gcc-4.0.2/gcc/config/sparc/linux.h
1.333 ++++ gcc-4.0.2/gcc/config/sparc/linux.h
1.334 +@@ -130,14 +130,19 @@
1.335 +
1.336 + /* If ELF is the default format, we should not use /lib/elf. */
1.337 +
1.338 ++#ifdef USE_UCLIBC
1.339 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.340 ++#else
1.341 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
1.342 ++#endif
1.343 + #undef LINK_SPEC
1.344 + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
1.345 + %{!mno-relax:%{!r:-relax}} \
1.346 + %{!shared: \
1.347 + %{!ibcs: \
1.348 + %{!static: \
1.349 + %{rdynamic:-export-dynamic} \
1.350 +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
1.351 ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
1.352 + %{static:-static}}}"
1.353 +
1.354 + /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
1.355 +--- gcc-4.0.2/gcc/config/sparc/linux64.h
1.356 ++++ gcc-4.0.2/gcc/config/sparc/linux64.h
1.357 +@@ -167,12 +166,17 @@
1.358 + { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
1.359 + { "link_arch", LINK_ARCH_SPEC },
1.360 +
1.361 ++#ifdef USE_UCLIBC
1.362 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
1.363 ++#else
1.364 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
1.365 ++#endif
1.366 + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
1.367 + %{!shared: \
1.368 + %{!ibcs: \
1.369 + %{!static: \
1.370 + %{rdynamic:-export-dynamic} \
1.371 +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
1.372 ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
1.373 + %{static:-static}}} \
1.374 + "
1.375 +
1.376 +--- gcc-4.0.2/libtool.m4
1.377 ++++ gcc-4.0.2/libtool.m4
1.378 +@@ -682,6 +682,11 @@
1.379 + lt_cv_deplibs_check_method=pass_all
1.380 + ;;
1.381 +
1.382 ++linux-uclibc*)
1.383 ++ lt_cv_deplibs_check_method=pass_all
1.384 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.385 ++ ;;
1.386 ++
1.387 + netbsd* | knetbsd*-gnu)
1.388 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.389 + [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
1.390 +--- gcc-4.0.2/ltconfig
1.391 ++++ gcc-4.0.2/ltconfig
1.392 +@@ -603,6 +603,7 @@
1.393 +
1.394 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1.395 + case $host_os in
1.396 ++linux-uclibc*) ;;
1.397 + linux-gnu*) ;;
1.398 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1.399 + esac
1.400 +@@ -1274,6 +1275,23 @@
1.401 + dynamic_linker='GNU/Linux ld.so'
1.402 + ;;
1.403 +
1.404 ++linux-uclibc*)
1.405 ++ version_type=linux
1.406 ++ need_lib_prefix=no
1.407 ++ need_version=no
1.408 ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1.409 ++ soname_spec='${libname}${release}.so$major'
1.410 ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1.411 ++ shlibpath_var=LD_LIBRARY_PATH
1.412 ++ shlibpath_overrides_runpath=no
1.413 ++ # This implies no fast_install, which is unacceptable.
1.414 ++ # Some rework will be needed to allow for fast_install
1.415 ++ # before this can be enabled.
1.416 ++ hardcode_into_libs=yes
1.417 ++ # Assume using the uClibc dynamic linker.
1.418 ++ dynamic_linker="uClibc ld.so"
1.419 ++ ;;
1.420 ++
1.421 + netbsd*)
1.422 + need_lib_prefix=no
1.423 + need_version=no
1.424 +--- gcc-4.0.2/libffi/configure
1.425 ++++ gcc-4.0.2/libffi/configure
1.426 +@@ -3457,6 +3457,11 @@
1.427 + lt_cv_deplibs_check_method=pass_all
1.428 + ;;
1.429 +
1.430 ++linux-uclibc*)
1.431 ++ lt_cv_deplibs_check_method=pass_all
1.432 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.433 ++ ;;
1.434 ++
1.435 + netbsd* | knetbsd*-gnu)
1.436 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.437 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.438 +--- gcc-4.0.2/libgfortran/configure
1.439 ++++ gcc-4.0.2/libgfortran/configure
1.440 +@@ -3681,6 +3681,11 @@
1.441 + lt_cv_deplibs_check_method=pass_all
1.442 + ;;
1.443 +
1.444 ++linux-uclibc*)
1.445 ++ lt_cv_deplibs_check_method=pass_all
1.446 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.447 ++ ;;
1.448 ++
1.449 + netbsd* | knetbsd*-gnu)
1.450 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.451 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.452 +--- gcc-4.0.2/libjava/configure
1.453 ++++ gcc-4.0.2/libjava/configure
1.454 +@@ -4351,6 +4351,11 @@
1.455 + lt_cv_deplibs_check_method=pass_all
1.456 + ;;
1.457 +
1.458 ++linux-uclibc*)
1.459 ++ lt_cv_deplibs_check_method=pass_all
1.460 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.461 ++ ;;
1.462 ++
1.463 + netbsd* | knetbsd*-gnu)
1.464 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.465 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.466 +--- gcc-4.0.2/libmudflap/configure
1.467 ++++ gcc-4.0.2/libmudflap/configure
1.468 +@@ -5380,6 +5380,11 @@
1.469 + lt_cv_deplibs_check_method=pass_all
1.470 + ;;
1.471 +
1.472 ++linux-uclibc*)
1.473 ++ lt_cv_deplibs_check_method=pass_all
1.474 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.475 ++ ;;
1.476 ++
1.477 + netbsd* | knetbsd*-gnu)
1.478 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.479 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.480 +--- gcc-4.0.2/libobjc/configure
1.481 ++++ gcc-4.0.2/libobjc/configure
1.482 +@@ -3283,6 +3283,11 @@
1.483 + lt_cv_deplibs_check_method=pass_all
1.484 + ;;
1.485 +
1.486 ++linux-uclibc*)
1.487 ++ lt_cv_deplibs_check_method=pass_all
1.488 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.489 ++ ;;
1.490 ++
1.491 + netbsd* | knetbsd*-gnu)
1.492 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.493 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.494 +--- gcc-4.0.2/boehm-gc/configure
1.495 ++++ gcc-4.0.2/boehm-gc/configure
1.496 +@@ -4320,6 +4320,11 @@
1.497 + lt_cv_deplibs_check_method=pass_all
1.498 + ;;
1.499 +
1.500 ++linux-uclibc*)
1.501 ++ lt_cv_deplibs_check_method=pass_all
1.502 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.503 ++ ;;
1.504 ++
1.505 + netbsd* | knetbsd*-gnu)
1.506 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.507 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.508 +--- gcc-4.0.2/configure
1.509 ++++ gcc-4.0.2/configure
1.510 +@@ -1141,7 +1141,7 @@
1.511 + ;;
1.512 + "")
1.513 + case "${target}" in
1.514 +- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
1.515 ++ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
1.516 + # Enable libmudflap by default in GNU and friends.
1.517 + ;;
1.518 + *-*-freebsd*)
1.519 +--- gcc-4.0.2/configure.in
1.520 ++++ gcc-4.0.2/configure.in
1.521 +@@ -350,7 +350,7 @@
1.522 + ;;
1.523 + "")
1.524 + case "${target}" in
1.525 +- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
1.526 ++ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
1.527 + # Enable libmudflap by default in GNU and friends.
1.528 + ;;
1.529 + *-*-freebsd*)
1.530 +--- gcc-4.0.2/contrib/regression/objs-gcc.sh
1.531 ++++ gcc-4.0.2/contrib/regression/objs-gcc.sh
1.532 +@@ -105,6 +105,10 @@
1.533 + then
1.534 + make all-gdb all-dejagnu all-ld || exit 1
1.535 + make install-gdb install-dejagnu install-ld || exit 1
1.536 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
1.537 ++ then
1.538 ++ make all-gdb all-dejagnu all-ld || exit 1
1.539 ++ make install-gdb install-dejagnu install-ld || exit 1
1.540 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
1.541 + make bootstrap || exit 1
1.542 + make install || exit 1
1.543 +--- gcc-4.0.2/zlib/configure
1.544 ++++ gcc-4.0.2/zlib/configure
1.545 +@@ -3426,6 +3426,11 @@
1.546 + lt_cv_deplibs_check_method=pass_all
1.547 + ;;
1.548 +
1.549 ++linux-uclibc*)
1.550 ++ lt_cv_deplibs_check_method=pass_all
1.551 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.552 ++ ;;
1.553 ++
1.554 + netbsd* | knetbsd*-gnu)
1.555 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.556 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'