1 --- gcc-3.4.1/gcc/config.gcc
2 +++ gcc-3.4.1/gcc/config.gcc
3 @@ -2310,10 +2310,16 @@
5 echo "*** Configuration ${target} not supported" 1>&2
10 +# Rather than hook into each target, just do it after all the linux
11 +# targets have been processed
13 +*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC"
16 # Support for --with-cpu and related options (and a few unrelated options,
20 --- gcc-3.4.4/gcc/config/alpha/linux-elf.h
21 +++ gcc-3.4.4/gcc/config/alpha/linux-elf.h
23 #define SUBTARGET_EXTRA_SPECS \
24 { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
27 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
29 #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
32 #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
33 %{O*:-O3} %{!O*:-O1} \
34 --- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h 2004-01-31 00:18:11.000000000 -0600
35 +++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-08-12 15:54:42.000000000 -0500
37 #define ENDFILE_SPEC \
38 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
41 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
43 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
46 #define LINK_SPEC "%{h*} %{version:-v} \
50 %{symbolic:-Bsymbolic} \
51 %{rdynamic:-export-dynamic} \
52 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
53 + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
56 SUBTARGET_EXTRA_LINK_SPEC
57 --- gcc-3.4.1-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
58 +++ gcc-3.4.1/gcc/config/cris/linux.h 2004-08-12 15:54:43.000000000 -0500
60 #undef CRIS_DEFAULT_CPU_VERSION
61 #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
65 +#undef CRIS_SUBTARGET_VERSION
66 +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
68 +#undef CRIS_LINK_SUBTARGET_SPEC
69 +#define CRIS_LINK_SUBTARGET_SPEC \
71 + -rpath-link include/asm/../..%s\
72 + %{shared} %{static}\
73 + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
76 + %{rdynamic:-export-dynamic} \
77 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
78 + %{!r:%{O2|O3: --gc-sections}}"
80 +#else /* USE_UCLIBC */
82 #undef CRIS_SUBTARGET_VERSION
83 #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
86 %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
87 %{!r:%{O2|O3: --gc-sections}}"
89 +#endif /* USE_UCLIBC */
92 /* Node: Run-time Target */
94 --- gcc-3.4.1-dist/gcc/config/i386/linux.h 2003-11-28 21:08:10.000000000 -0600
95 +++ gcc-3.4.1/gcc/config/i386/linux.h 2004-08-12 15:54:43.000000000 -0500
100 -#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
104 - %{rdynamic:-export-dynamic} \
105 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
106 - %{static:-static}}}"
107 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.1"
110 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
112 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
115 #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
119 %{rdynamic:-export-dynamic} \
120 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
121 + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
125 /* A C statement (sans semicolon) to output to the stdio stream
126 FILE the assembler definition of uninitialized global DECL named
127 --- gcc-3.4.4/gcc/config/i386/linux64.h
128 +++ gcc-3.4.4/gcc/config/i386/linux64.h
130 When the -shared link option is used a final link is not being
134 +#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
135 +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
137 +#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
138 +#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
141 #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
145 %{rdynamic:-export-dynamic} \
146 - %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
147 - %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
148 + %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
149 + %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
152 #define MULTILIB_DEFAULTS { "m64" }
153 --- gcc-3.4.4/gcc/config/ia64/linux.h
154 +++ gcc-3.4.4/gcc/config/ia64/linux.h
156 /* Define this for shared library support because it isn't in the main
160 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
162 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
169 %{rdynamic:-export-dynamic} \
170 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
171 + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
175 --- gcc-3.4.4/gcc/config/m68k/linux.h
176 +++ gcc-3.4.4/gcc/config/m68k/linux.h
177 @@ -131,12 +131,17 @@
179 /* If ELF is the default format, we should not use /lib/elf. */
182 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
184 +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
187 #define LINK_SPEC "-m m68kelf %{shared} \
190 %{rdynamic:-export-dynamic} \
191 - %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
192 + %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
195 /* For compatibility with linux/a.out */
196 --- gcc-3.4.1-dist/gcc/config/mips/linux.h 2004-06-15 20:42:24.000000000 -0500
197 +++ gcc-3.4.1/gcc/config/mips/linux.h 2004-08-12 15:54:43.000000000 -0500
198 @@ -109,14 +109,19 @@
200 /* Borrowed from sparc/linux.h */
203 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
205 +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
213 %{rdynamic:-export-dynamic} \
214 - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
215 + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
218 #undef SUBTARGET_ASM_SPEC
219 --- gcc-3.4.4/gcc/config/pa/pa-linux.h
220 +++ gcc-3.4.4/gcc/config/pa/pa-linux.h
222 /* Define this for shared library support because it isn't in the main
226 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
228 +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
235 %{rdynamic:-export-dynamic} \
236 - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
237 + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
240 /* glibc's profiling functions don't need gcc to allocate counters. */
241 --- gcc-3.4.1-dist/gcc/config/rs6000/linux.h 2004-02-25 09:11:19.000000000 -0600
242 +++ gcc-3.4.1/gcc/config/rs6000/linux.h 2004-08-12 15:54:43.000000000 -0500
244 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
246 #undef LINK_OS_DEFAULT_SPEC
248 +#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
250 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
253 #define LINK_GCC_C_SEQUENCE_SPEC \
254 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
255 --- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h 2004-06-10 01:39:50.000000000 -0500
256 +++ gcc-3.4.1/gcc/config/rs6000/sysv4.h 2004-08-12 15:54:43.000000000 -0500
258 mcall-linux : %(link_os_linux) ; \
259 mcall-gnu : %(link_os_gnu) ; \
260 mcall-netbsd : %(link_os_netbsd) ; \
261 + mcall-linux-uclibc : %(link_os_linux_uclibc); \
262 mcall-openbsd: %(link_os_openbsd) ; \
263 : %(link_os_default) }"
265 @@ -1125,6 +1126,10 @@
266 %{rdynamic:-export-dynamic} \
267 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
269 +#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
270 + %{rdynamic:-export-dynamic} \
271 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
273 #if defined(HAVE_LD_EH_FRAME_HDR)
274 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
276 @@ -1291,6 +1296,7 @@
277 { "link_os_sim", LINK_OS_SIM_SPEC }, \
278 { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
279 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
280 + { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
281 { "link_os_gnu", LINK_OS_GNU_SPEC }, \
282 { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
283 { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
284 --- gcc-3.4.4/gcc/config/s390/linux.h
285 +++ gcc-3.4.4/gcc/config/s390/linux.h
287 #define MULTILIB_DEFAULTS { "m31" }
291 +#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
292 +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
294 +#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
295 +#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
299 "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
302 %{rdynamic:-export-dynamic} \
304 - %{m31:-dynamic-linker /lib/ld.so.1} \
305 - %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
306 + %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
307 + %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
310 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
311 --- gcc-3.4.1-dist/gcc/config/sh/linux.h 2004-01-11 20:29:13.000000000 -0600
312 +++ gcc-3.4.1/gcc/config/sh/linux.h 2004-08-12 15:54:43.000000000 -0500
314 #undef SUBTARGET_LINK_EMUL_SUFFIX
315 #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
316 #undef SUBTARGET_LINK_SPEC
318 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
320 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
322 #define SUBTARGET_LINK_SPEC \
325 %{rdynamic:-export-dynamic} \
326 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
327 + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
331 --- gcc-3.4.4/gcc/config/sparc/linux.h
332 +++ gcc-3.4.4/gcc/config/sparc/linux.h
333 @@ -162,13 +162,18 @@
334 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
338 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
340 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
342 #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
343 %{!mno-relax:%{!r:-relax}} \
347 %{rdynamic:-export-dynamic} \
348 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
349 + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
353 --- gcc-3.4.4/gcc/config/sparc/linux64.h
354 +++ gcc-3.4.4/gcc/config/sparc/linux64.h
355 @@ -167,12 +166,17 @@
356 { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
357 { "link_arch", LINK_ARCH_SPEC },
360 +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
362 +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
364 #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
368 %{rdynamic:-export-dynamic} \
369 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
370 + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
371 %{static:-static}}} \
374 --- gcc-3.4.1-dist/libtool.m4 2004-05-18 04:08:37.000000000 -0500
375 +++ gcc-3.4.1/libtool.m4 2004-08-12 15:54:43.000000000 -0500
377 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
381 + lt_cv_deplibs_check_method=pass_all
382 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
386 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
387 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
388 --- gcc-3.4.1-dist/ltconfig 2004-03-05 15:05:41.000000000 -0600
389 +++ gcc-3.4.1/ltconfig 2004-08-12 15:55:48.000000000 -0500
392 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
396 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
398 @@ -1262,6 +1263,24 @@
399 dynamic_linker='GNU/Linux ld.so'
406 + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
407 + soname_spec='${libname}${release}.so$major'
408 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
409 + shlibpath_var=LD_LIBRARY_PATH
410 + shlibpath_overrides_runpath=no
411 + # This implies no fast_install, which is unacceptable.
412 + # Some rework will be needed to allow for fast_install
413 + # before this can be enabled.
414 + # Note: copied from linux-gnu, and may not be appropriate.
415 + hardcode_into_libs=yes
416 + # Assume using the uClibc dynamic linker.
417 + dynamic_linker="uClibc ld.so"
423 --- gcc-3.4.1-dist/boehm-gc/configure 2004-07-01 14:14:03.000000000 -0500
424 +++ gcc-3.4.1/boehm-gc/configure 2004-08-12 16:22:57.000000000 -0500
425 @@ -1947,6 +1947,11 @@
426 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
430 + lt_cv_deplibs_check_method=pass_all
431 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
435 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
436 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
437 --- gcc-3.4.1-dist/boehm-gc/ltconfig 2002-11-20 09:59:06.000000000 -0600
438 +++ gcc-3.4.1/boehm-gc/ltconfig 2004-08-12 15:54:42.000000000 -0500
439 @@ -1981,6 +1981,23 @@
447 + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
448 + soname_spec='${libname}${release}.so$major'
449 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
450 + shlibpath_var=LD_LIBRARY_PATH
451 + shlibpath_overrides_runpath=no
452 + deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
453 + file_magic_cmd=/usr/bin/file
454 + file_magic_test_file=`echo /lib/libuClibc-*.so`
456 + # Assume using the uClibc dynamic linker.
457 + dynamic_linker="uClibc ld.so"
462 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then