1 diff -urN gcc-4.1.0/boehm-gc/configure gcc-4.1.0-patched/boehm-gc/configure
2 --- gcc-4.1.0/boehm-gc/configure 2005-04-13 19:31:24.000000000 -0500
3 +++ gcc-4.1.0-patched/boehm-gc/configure 2005-04-25 20:47:19.919723167 -0500
5 lt_cv_deplibs_check_method=pass_all
9 + lt_cv_deplibs_check_method=pass_all
10 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
13 netbsd* | knetbsd*-gnu)
14 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
15 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
16 diff -urN gcc-4.1.0/gcc/config/arm/linux-elf.h gcc-4.1.0-patched/gcc/config/arm/linux-elf.h
17 --- gcc-4.1.0/gcc/config/arm/linux-elf.h 2005-03-02 10:27:42.000000000 -0600
18 +++ gcc-4.1.0-patched/gcc/config/arm/linux-elf.h 2005-04-25 20:45:31.795953620 -0500
20 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
24 +#define LINK_SPEC "%{h*} %{version:-v} \
26 + %{static:-Bstatic} \
28 + %{symbolic:-Bsymbolic} \
29 + %{rdynamic:-export-dynamic} \
30 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
32 + %{mbig-endian:-EB}" \
33 + SUBTARGET_EXTRA_LINK_SPEC
35 #define LINK_SPEC "%{h*} %{version:-v} \
41 SUBTARGET_EXTRA_LINK_SPEC
44 #define TARGET_OS_CPP_BUILTINS() \
46 diff -urN gcc-4.1.0/gcc/config/cris/linux.h gcc-4.1.0-patched/gcc/config/cris/linux.h
47 --- gcc-4.1.0/gcc/config/cris/linux.h 2005-04-23 23:01:27.000000000 -0500
48 +++ gcc-4.1.0-patched/gcc/config/cris/linux.h 2005-04-25 20:45:31.796953451 -0500
50 #undef CRIS_DEFAULT_CPU_VERSION
51 #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
55 +#undef CRIS_SUBTARGET_VERSION
56 +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
58 +#undef CRIS_LINK_SUBTARGET_SPEC
59 +#define CRIS_LINK_SUBTARGET_SPEC \
61 + -rpath-link include/asm/../..%s\
62 + %{shared} %{static}\
63 + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
66 + %{rdynamic:-export-dynamic} \
67 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
68 + %{!r:%{O2|O3: --gc-sections}}"
70 +#else /* USE_UCLIBC */
72 #undef CRIS_SUBTARGET_VERSION
73 #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
76 %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
77 %{!r:%{O2|O3: --gc-sections}}"
79 +#endif /* USE_UCLIBC */
82 /* Node: Run-time Target */
84 diff -urN gcc-4.1.0/gcc/config/cris/t-linux-uclibc gcc-4.1.0-patched/gcc/config/cris/t-linux-uclibc
85 --- gcc-4.1.0/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
86 +++ gcc-4.1.0-patched/gcc/config/cris/t-linux-uclibc 2005-04-25 20:45:31.797953283 -0500
88 +T_CFLAGS = -DUSE_UCLIBC
89 +TARGET_LIBGCC2_CFLAGS += -fPIC
90 +CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
91 diff -urN gcc-4.1.0/gcc/config/i386/linux.h gcc-4.1.0-patched/gcc/config/i386/linux.h
92 --- gcc-4.1.0/gcc/config/i386/linux.h 2004-11-27 10:45:14.000000000 -0600
93 +++ gcc-4.1.0-patched/gcc/config/i386/linux.h 2005-04-25 21:21:05.828409973 -0500
96 /* If ELF is the default format, we should not use /lib/elf. */
98 +#if defined USE_UCLIBC
99 +#define LINK_EMULATION "elf_i386"
100 +#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
102 #define LINK_EMULATION "elf_i386"
103 #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
106 #undef SUBTARGET_EXTRA_SPECS
107 #define SUBTARGET_EXTRA_SPECS \
114 /* Handle special EH pointer encodings. Absolute, pc-relative, and
115 indirect are handled automatically. */
116 diff -urN gcc-4.1.0/gcc/config/mips/linux.h gcc-4.1.0-patched/gcc/config/mips/linux.h
117 --- gcc-4.1.0/gcc/config/mips/linux.h 2005-01-25 20:04:46.000000000 -0600
118 +++ gcc-4.1.0-patched/gcc/config/mips/linux.h 2005-04-25 20:45:31.809951259 -0500
121 /* Borrowed from sparc/linux.h */
126 + %{shared:-shared} \
130 + %{rdynamic:-export-dynamic} \
131 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
132 + %{static:-static}}}"
138 %{rdynamic:-export-dynamic} \
139 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
143 #undef SUBTARGET_ASM_SPEC
144 #define SUBTARGET_ASM_SPEC "%{mabi=64: -64} %{!mno-abicalls:-KPIC}"
145 diff -urN gcc-4.1.0/gcc/config/rs6000/linux.h gcc-4.1.0-patched/gcc/config/rs6000/linux.h
146 --- gcc-4.1.0/gcc/config/rs6000/linux.h 2004-12-01 20:21:28.000000000 -0600
147 +++ gcc-4.1.0-patched/gcc/config/rs6000/linux.h 2005-04-25 20:45:31.810951091 -0500
149 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
151 #undef LINK_OS_DEFAULT_SPEC
153 +#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
155 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
158 #define LINK_GCC_C_SEQUENCE_SPEC \
159 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
160 diff -urN gcc-4.1.0/gcc/config/rs6000/sysv4.h gcc-4.1.0-patched/gcc/config/rs6000/sysv4.h
161 --- gcc-4.1.0/gcc/config/rs6000/sysv4.h 2005-04-13 19:26:50.000000000 -0500
162 +++ gcc-4.1.0-patched/gcc/config/rs6000/sysv4.h 2005-04-25 20:45:31.812950754 -0500
164 mcall-linux : %(link_os_linux) ; \
165 mcall-gnu : %(link_os_gnu) ; \
166 mcall-netbsd : %(link_os_netbsd) ; \
167 + mcall-linux-uclibc : %(link_os_linux_uclibc); \
168 mcall-openbsd: %(link_os_openbsd) ; \
169 : %(link_os_default) }"
171 @@ -1135,6 +1136,10 @@
172 %{rdynamic:-export-dynamic} \
173 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
175 +#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
176 + %{rdynamic:-export-dynamic} \
177 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
179 #if defined(HAVE_LD_EH_FRAME_HDR)
180 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
182 @@ -1301,6 +1306,7 @@
183 { "link_os_sim", LINK_OS_SIM_SPEC }, \
184 { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
185 { "link_os_linux", LINK_OS_LINUX_SPEC }, \
186 + { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
187 { "link_os_gnu", LINK_OS_GNU_SPEC }, \
188 { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
189 { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
190 diff -urN gcc-4.1.0/gcc/config/sh/linux.h gcc-4.1.0-patched/gcc/config/sh/linux.h
191 --- gcc-4.1.0/gcc/config/sh/linux.h 2005-02-28 21:39:03.000000000 -0600
192 +++ gcc-4.1.0-patched/gcc/config/sh/linux.h 2005-04-25 20:45:31.814950416 -0500
194 #undef SUBTARGET_LINK_EMUL_SUFFIX
195 #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
196 #undef SUBTARGET_LINK_SPEC
198 +#define SUBTARGET_LINK_SPEC \
199 + "%{shared:-shared} \
201 + %{rdynamic:-export-dynamic} \
202 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
205 #define SUBTARGET_LINK_SPEC \
208 %{rdynamic:-export-dynamic} \
209 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
213 /* Output assembler code to STREAM to call the profiler. */
215 diff -urN gcc-4.1.0/gcc/config/sh/t-linux-uclibc gcc-4.1.0-patched/gcc/config/sh/t-linux-uclibc
216 --- gcc-4.1.0/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
217 +++ gcc-4.1.0-patched/gcc/config/sh/t-linux-uclibc 2005-04-25 20:45:31.814950416 -0500
219 +T_CFLAGS = -DUSE_UCLIBC
221 +TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
222 +LIB1ASMFUNCS_CACHE = _ic_invalidate
226 +MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
229 +MULTILIB_EXCEPTIONS=
231 +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
232 diff -urN gcc-4.1.0/gcc/config/sh/t-sh64-uclibc gcc-4.1.0-patched/gcc/config/sh/t-sh64-uclibc
233 --- gcc-4.1.0/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
234 +++ gcc-4.1.0-patched/gcc/config/sh/t-sh64-uclibc 2005-04-25 20:45:31.815950248 -0500
236 +EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
239 + _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
240 + _shcompact_call_trampoline _shcompact_return_trampoline \
241 + _shcompact_incoming_args _ic_invalidate _nested_trampoline \
242 + _push_pop_shmedia_regs \
243 + _udivdi3 _divdi3 _umoddi3 _moddi3
245 +MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
246 +MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
248 +MULTILIB_EXCEPTIONS=
249 diff -urN gcc-4.1.0/gcc/config/t-linux-uclibc gcc-4.1.0-patched/gcc/config/t-linux-uclibc
250 --- gcc-4.1.0/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
251 +++ gcc-4.1.0-patched/gcc/config/t-linux-uclibc 2005-04-25 20:45:31.815950248 -0500
253 +T_CFLAGS = -DUSE_UCLIBC
255 +# Compile crtbeginS.o and crtendS.o with pic.
256 +CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
257 +# Compile libgcc2.a with pic.
258 +TARGET_LIBGCC2_CFLAGS = -fPIC
260 +# Override t-slibgcc-elf-ver to export some libgcc symbols with
261 +# the symbol versions that glibc used.
262 +#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
264 +# Use unwind-dw2-fde
265 +LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
266 + $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
267 +LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
268 diff -urN gcc-4.1.0/gcc/config.gcc gcc-4.1.0-patched/gcc/config.gcc
269 --- gcc-4.1.0/gcc/config.gcc 2005-04-23 23:01:23.000000000 -0500
270 +++ gcc-4.1.0-patched/gcc/config.gcc 2005-04-25 21:12:43.375594576 -0500
272 case ${enable_threads} in
273 "" | yes | posix) thread_file='posix' ;;
275 - tmake_file="t-slibgcc-elf-ver t-linux"
278 + tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
281 + tmake_file="t-slibgcc-elf-ver t-linux"
286 # On the Hurd, the setup is just about the same on
291 +arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
292 + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
293 + tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
294 + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
297 arm*-*-linux*) # ARM GNU/Linux with ELF
298 tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
299 tmake_file="${tmake_file} arm/t-arm arm/t-linux"
302 extra_options="${extra_options} cris/elf.opt"
304 +cris-*-linux-uclibc*)
305 + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
306 + tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
309 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
310 # We need to avoid using t-linux, so override default tmake_file
311 @@ -1443,6 +1460,16 @@
315 +mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
316 + tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
319 + target_cpu_default="MASK_SOFT_FLOAT"
320 + tm_defines="MIPS_ISA_DEFAULT=32"
323 + tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
325 mips*-*-linux*) # Linux MIPS, either endian.
326 tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
328 @@ -1659,6 +1686,10 @@
329 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
330 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
332 +powerpc-*-linux-uclibc*)
333 + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
334 + tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
337 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
338 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
339 @@ -1821,6 +1852,8 @@
341 tm_file="${tm_file} sh/elf.h"
343 + sh*-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc"
344 + tm_file="${tm_file} linux.h sh/linux.h" ;;
345 sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
346 tm_file="${tm_file} linux.h sh/linux.h" ;;
347 sh*-*-kaos*) tm_file="${tm_file} sh/embed-elf.h kaos.h sh/kaos-sh.h"
348 @@ -1840,6 +1873,11 @@
350 tmake_file="${tmake_file} sh/t-netbsd"
352 + sh64*-*-linux-uclibc*)
353 + tmake_file="${tmake_file} sh/t-sh64-uclibc"
354 + tm_file="${tm_file} sh/sh64.h"
355 + extra_headers="shmedia.h ushmedia.h sshmedia.h"
358 tmake_file="${tmake_file} sh/t-sh64 sh/t-linux64"
359 tm_file="${tm_file} sh/sh64.h"
360 diff -urN gcc-4.1.0/libtool.m4 gcc-4.1.0-patched/libtool.m4
361 --- gcc-4.1.0/libtool.m4 2005-04-13 19:31:24.000000000 -0500
362 +++ gcc-4.1.0-patched/libtool.m4 2005-04-25 20:47:51.679369687 -0500
364 lt_cv_deplibs_check_method=pass_all
368 + lt_cv_deplibs_check_method=pass_all
369 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
372 netbsd* | knetbsd*-gnu)
373 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
374 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
375 diff -urN gcc-4.1.0/ltconfig gcc-4.1.0-patched/ltconfig
376 --- gcc-4.1.0/ltconfig 2004-10-02 11:33:06.000000000 -0500
377 +++ gcc-4.1.0-patched/ltconfig 2005-04-25 20:45:31.836946707 -0500
380 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
384 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
386 @@ -1273,6 +1274,24 @@
387 dynamic_linker='GNU/Linux ld.so'
394 + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
395 + soname_spec='${libname}${release}.so$major'
396 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
397 + shlibpath_var=LD_LIBRARY_PATH
398 + shlibpath_overrides_runpath=no
399 + # This implies no fast_install, which is unacceptable.
400 + # Some rework will be needed to allow for fast_install
401 + # before this can be enabled.
402 + # Note: copied from linux-gnu, and may not be appropriate.
403 + hardcode_into_libs=yes
404 + # Assume using the uClibc dynamic linker.
405 + dynamic_linker="uClibc ld.so"