add mc
[buildroot.git] / toolchain / gcc / 3.3.5 / 100-uclibc-conf.patch
blobc5d76d940e9bc1be58c4fbd424fead40274c531d
1 diff -urN gcc-3.3.3-dist/boehm-gc/config.sub gcc-3.3.3/boehm-gc/config.sub
2 --- gcc-3.3.3-dist/boehm-gc/config.sub 2002-02-11 22:37:53.000000000 -0600
3 +++ gcc-3.3.3/boehm-gc/config.sub 2004-08-12 04:47:51.000000000 -0500
4 @@ -118,7 +118,7 @@
5 # Here we must recognize all the valid KERNEL-OS combinations.
6 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
7 case $maybe_os in
8 - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
9 + nto-qnx* | linux-gnu* | linux-uclibc* | storm-chaos* | os2-emx* | windows32-*)
10 os=-$maybe_os
11 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
13 @@ -1089,7 +1089,8 @@
14 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
15 | -chorusos* | -chorusrdb* \
16 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
17 - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
18 + | -mingw32* | -linux-gnu* | -linux-uclibc* \
19 + | -uxpv* | -beos* | -mpeix* | -udk* \
20 | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
21 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
22 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
23 diff -urN gcc-3.3.3-dist/boehm-gc/configure gcc-3.3.3/boehm-gc/configure
24 --- gcc-3.3.3-dist/boehm-gc/configure 2004-02-14 14:34:20.000000000 -0600
25 +++ gcc-3.3.3/boehm-gc/configure 2004-08-12 04:47:51.000000000 -0500
26 @@ -1940,6 +1940,11 @@
27 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
30 +linux-uclibc*)
31 + lt_cv_deplibs_check_method=pass_all
32 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
33 + ;;
35 netbsd*)
36 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
37 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
38 diff -urN gcc-3.3.3-dist/gcc/config/arm/linux-elf.h gcc-3.3.3/gcc/config/arm/linux-elf.h
39 --- gcc-3.3.3-dist/gcc/config/arm/linux-elf.h 2003-09-16 10:39:23.000000000 -0500
40 +++ gcc-3.3.3/gcc/config/arm/linux-elf.h 2004-08-12 04:47:51.000000000 -0500
41 @@ -78,6 +78,18 @@
42 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
44 #undef LINK_SPEC
45 +#ifdef USE_UCLIBC
46 +#define LINK_SPEC "%{h*} %{version:-v} \
47 + %{b} %{Wl,*:%*} \
48 + %{static:-Bstatic} \
49 + %{shared:-shared} \
50 + %{symbolic:-Bsymbolic} \
51 + %{rdynamic:-export-dynamic} \
52 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
53 + -X \
54 + %{mbig-endian:-EB}" \
55 + SUBTARGET_EXTRA_LINK_SPEC
56 +#else
57 #define LINK_SPEC "%{h*} %{version:-v} \
58 %{b} %{Wl,*:%*} \
59 %{static:-Bstatic} \
60 @@ -88,6 +100,7 @@
61 -X \
62 %{mbig-endian:-EB}" \
63 SUBTARGET_EXTRA_LINK_SPEC
64 +#endif
66 #define TARGET_OS_CPP_BUILTINS() \
67 do { \
68 diff -urN gcc-3.3.3-dist/gcc/config/cris/linux.h gcc-3.3.3/gcc/config/cris/linux.h
69 --- gcc-3.3.3-dist/gcc/config/cris/linux.h 2003-03-10 21:01:35.000000000 -0600
70 +++ gcc-3.3.3/gcc/config/cris/linux.h 2004-08-12 04:47:51.000000000 -0500
71 @@ -81,6 +81,25 @@
72 #undef CRIS_DEFAULT_CPU_VERSION
73 #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
75 +#ifdef USE_UCLIBC
77 +#undef CRIS_SUBTARGET_VERSION
78 +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
80 +#undef CRIS_LINK_SUBTARGET_SPEC
81 +#define CRIS_LINK_SUBTARGET_SPEC \
82 + "-mcrislinux\
83 + -rpath-link include/asm/../..%s\
84 + %{shared} %{static}\
85 + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
86 + %{!shared: \
87 + %{!static: \
88 + %{rdynamic:-export-dynamic} \
89 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
90 + %{!r:%{O2|O3: --gc-sections}}"
92 +#else /* USE_UCLIBC */
94 #undef CRIS_SUBTARGET_VERSION
95 #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
97 @@ -95,6 +114,8 @@
98 %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
99 %{!r:%{O2|O3: --gc-sections}}"
101 +#endif /* USE_UCLIBC */
104 /* Node: Run-time Target */
106 diff -urN gcc-3.3.3-dist/gcc/config/cris/t-linux-uclibc gcc-3.3.3/gcc/config/cris/t-linux-uclibc
107 --- gcc-3.3.3-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
108 +++ gcc-3.3.3/gcc/config/cris/t-linux-uclibc 2004-08-12 04:47:51.000000000 -0500
109 @@ -0,0 +1,3 @@
110 +T_CFLAGS = -DUSE_UCLIBC
111 +TARGET_LIBGCC2_CFLAGS += -fPIC
112 +CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
113 diff -urN gcc-3.3.3-dist/gcc/config/i386/linux.h gcc-3.3.3/gcc/config/i386/linux.h
114 --- gcc-3.3.3-dist/gcc/config/i386/linux.h 2003-11-14 00:46:12.000000000 -0600
115 +++ gcc-3.3.3/gcc/config/i386/linux.h 2004-08-12 04:47:51.000000000 -0500
116 @@ -136,6 +136,15 @@
117 %{static:-static}}}"
118 #endif
119 #else
120 +#if defined USE_UCLIBC
121 +#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
122 + %{!shared: \
123 + %{!ibcs: \
124 + %{!static: \
125 + %{rdynamic:-export-dynamic} \
126 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
127 + %{static:-static}}}"
128 +#else
129 #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
130 %{!shared: \
131 %{!ibcs: \
132 @@ -144,6 +153,7 @@
133 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
134 %{static:-static}}}"
135 #endif
136 +#endif
138 /* A C statement (sans semicolon) to output to the stdio stream
139 FILE the assembler definition of uninitialized global DECL named
140 diff -urN gcc-3.3.3-dist/gcc/config/mips/linux.h gcc-3.3.3/gcc/config/mips/linux.h
141 --- gcc-3.3.3-dist/gcc/config/mips/linux.h 2003-12-23 02:58:00.000000000 -0600
142 +++ gcc-3.3.3/gcc/config/mips/linux.h 2004-08-12 04:47:51.000000000 -0500
143 @@ -175,6 +175,17 @@
145 /* Borrowed from sparc/linux.h */
146 #undef LINK_SPEC
147 +#ifdef USE_UCLIBC
148 +#define LINK_SPEC \
149 + "%(endian_spec) \
150 + %{shared:-shared} \
151 + %{!shared: \
152 + %{!ibcs: \
153 + %{!static: \
154 + %{rdynamic:-export-dynamic} \
155 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
156 + %{static:-static}}}"
157 +#else
158 #define LINK_SPEC \
159 "%(endian_spec) \
160 %{shared:-shared} \
161 @@ -184,6 +195,7 @@
162 %{rdynamic:-export-dynamic} \
163 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
164 %{static:-static}}}"
165 +#endif
167 #undef SUBTARGET_ASM_SPEC
168 #define SUBTARGET_ASM_SPEC "\
169 diff -urN gcc-3.3.3-dist/gcc/config/sh/linux.h gcc-3.3.3/gcc/config/sh/linux.h
170 --- gcc-3.3.3-dist/gcc/config/sh/linux.h 2003-11-06 17:13:33.000000000 -0600
171 +++ gcc-3.3.3/gcc/config/sh/linux.h 2004-08-12 04:47:51.000000000 -0500
172 @@ -44,12 +44,21 @@
173 #undef SUBTARGET_LINK_EMUL_SUFFIX
174 #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
175 #undef SUBTARGET_LINK_SPEC
176 +#ifdef USE_UCLIBC
177 +#define SUBTARGET_LINK_SPEC \
178 + "%{shared:-shared} \
179 + %{!static: \
180 + %{rdynamic:-export-dynamic} \
181 + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
182 + %{static:-static}"
183 +#else
184 #define SUBTARGET_LINK_SPEC \
185 "%{shared:-shared} \
186 %{!static: \
187 %{rdynamic:-export-dynamic} \
188 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
189 %{static:-static}"
190 +#endif
192 /* The GNU C++ standard library requires that these macros be defined. */
193 #undef CPLUSPLUS_CPP_SPEC
194 diff -urN gcc-3.3.3-dist/gcc/config/sh/t-linux-uclibc gcc-3.3.3/gcc/config/sh/t-linux-uclibc
195 --- gcc-3.3.3-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
196 +++ gcc-3.3.3/gcc/config/sh/t-linux-uclibc 2004-08-12 04:47:51.000000000 -0500
197 @@ -0,0 +1,16 @@
198 +T_CFLAGS = -DUSE_UCLIBC
200 +# Don't run fixproto
201 +STMP_FIXPROTO =
203 +TARGET_LIBGCC2_CFLAGS = -fpic
204 +LIB1ASMFUNCS_CACHE = _ic_invalidate
206 +LIB2FUNCS_EXTRA=
208 +MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
209 +MULTILIB_DIRNAMES=
210 +MULTILIB_MATCHES =
211 +MULTILIB_EXCEPTIONS=
213 +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
214 diff -urN gcc-3.3.3-dist/gcc/config/sh/t-sh64-uclibc gcc-3.3.3/gcc/config/sh/t-sh64-uclibc
215 --- gcc-3.3.3-dist/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
216 +++ gcc-3.3.3/gcc/config/sh/t-sh64-uclibc 2004-08-12 04:47:51.000000000 -0500
217 @@ -0,0 +1,13 @@
218 +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o
220 +LIB1ASMFUNCS = \
221 + _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
222 + _shcompact_call_trampoline _shcompact_return_trampoline \
223 + _shcompact_incoming_args _ic_invalidate _nested_trampoline \
224 + _push_pop_shmedia_regs \
225 + _udivdi3 _divdi3 _umoddi3 _moddi3
227 +MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
228 +MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
229 +MULTILIB_MATCHES=
230 +MULTILIB_EXCEPTIONS=
231 diff -urN gcc-3.3.3-dist/gcc/config/t-linux-uclibc gcc-3.3.3/gcc/config/t-linux-uclibc
232 --- gcc-3.3.3-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
233 +++ gcc-3.3.3/gcc/config/t-linux-uclibc 2004-08-12 04:47:51.000000000 -0500
234 @@ -0,0 +1,23 @@
235 +T_CFLAGS = -DUSE_UCLIBC
237 +# Don't run fixproto
238 +STMP_FIXPROTO =
240 +# Compile crtbeginS.o and crtendS.o with pic.
241 +CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
242 +# Compile libgcc2.a with pic.
243 +TARGET_LIBGCC2_CFLAGS = -fPIC
245 +# Override t-slibgcc-elf-ver to export some libgcc symbols with
246 +# the symbol versions that glibc used.
247 +SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
249 +# Use unwind-dw2-fde-glibc
250 +#LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
251 +# $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
252 +#LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
254 +# Use unwind-dw2-fde
255 +LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
256 + $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
257 +LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
258 diff -urN gcc-3.3.3-dist/gcc/config.gcc gcc-3.3.3/gcc/config.gcc
259 --- gcc-3.3.3-dist/gcc/config.gcc 2004-01-21 00:06:00.000000000 -0600
260 +++ gcc-3.3.3/gcc/config.gcc 2004-08-12 04:47:51.000000000 -0500
261 @@ -697,6 +697,17 @@
262 extra_parts=""
263 use_collect2=yes
265 +arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
266 + tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
267 + tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
268 + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
269 + gnu_ld=yes
270 + case x${enable_threads} in
271 + x | xyes | xpthreads | xposix)
272 + thread_file='posix'
273 + ;;
274 + esac
275 + ;;
276 arm*-*-linux*) # ARM GNU/Linux with ELF
277 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
278 tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
279 @@ -772,6 +783,10 @@
280 tmake_file="cris/t-cris cris/t-elfmulti"
281 gas=yes
283 +cris-*-linux-uclibc*)
284 + tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
285 + tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
286 + ;;
287 cris-*-linux*)
288 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
289 tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
290 @@ -1173,6 +1188,11 @@
291 thread_file='single'
294 +i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
295 + # with ELF format using uClibc
296 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
297 + tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
298 + ;;
299 i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
300 # with ELF format using glibc 2
301 # aka GNU/Linux C library 6
302 @@ -1883,6 +1903,16 @@
303 tm_file="elfos.h ${tm_file} mips/netbsd.h"
304 tmake_file="${tmake_file} mips/t-netbsd"
306 +mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
307 + tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
308 + case $machine in
309 + mipsisa32*-*)
310 + target_cpu_default="MASK_SOFT_FLOAT"
311 + tm_defines="MIPS_ISA_DEFAULT=32"
312 + ;;
313 + esac
314 + tmake_file="t-slibgcc-elf-ver t-linux-uclibc mips/t-linux"
315 + ;;
316 mips*-*-linux*) # Linux MIPS, either endian.
317 tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
318 case $machine in
319 @@ -2129,6 +2159,11 @@
320 out_file=rs6000/rs6000.c
321 tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
323 +powerpc-*-linux-uclibc*)
324 + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
325 + out_file=rs6000/rs6000.c
326 + tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
327 + ;;
328 powerpc-*-linux*)
329 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
330 out_file=rs6000/rs6000.c
331 @@ -2313,10 +2348,18 @@
332 tmake_file="${tmake_file} sh/t-le"
334 esac
335 - tmake_file="${tmake_file} sh/t-linux"
336 + case $machine in
337 + *-*-linux-uclibc*) tmake_file="${tmake_file} sh/t-linux-uclibc" ;;
338 + *) tmake_file="${tmake_file} sh/t-linux" ;;
339 + esac
340 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
341 gas=yes gnu_ld=yes
342 case $machine in
343 + sh64*-*-linux-uclibc*)
344 + tmake_file="${tmake_file} sh/t-sh64-uclibc"
345 + tm_file="${tm_file} sh/sh64.h"
346 + extra_headers="shmedia.h ushmedia.h sshmedia.h"
347 + ;;
348 sh64*)
349 tmake_file="${tmake_file} sh/t-sh64"
350 tm_file="${tm_file} sh/sh64.h"
351 diff -urN gcc-3.3.3-dist/libstdc++-v3/aclocal.m4 gcc-3.3.3/libstdc++-v3/aclocal.m4
352 --- gcc-3.3.3-dist/libstdc++-v3/aclocal.m4 2004-01-12 10:18:44.000000000 -0600
353 +++ gcc-3.3.3/libstdc++-v3/aclocal.m4 2004-08-12 04:47:51.000000000 -0500
354 @@ -1216,6 +1216,9 @@
355 dnl Default to "generic"
356 if test x$enable_clocale_flag = xno; then
357 case x${target_os} in
358 + xlinux-uclibc*)
359 + enable_clocale_flag=uclibc
360 + ;;
361 xlinux* | xgnu*)
362 AC_EGREP_CPP([_GLIBCPP_ok], [
363 #include <features.h>
364 @@ -1339,6 +1342,41 @@
365 CTIME_CC=config/locale/generic/time_members.cc
366 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
368 + xuclibc)
369 + AC_MSG_RESULT(uclibc)
371 + # Declare intention to use gettext, and add support for specific
372 + # languages.
373 + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
374 + ALL_LINGUAS="de fr"
376 + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
377 + AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
378 + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
379 + USE_NLS=yes
380 + fi
381 + # Export the build objects.
382 + for ling in $ALL_LINGUAS; do \
383 + glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
384 + glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
385 + done
386 + AC_SUBST(glibcpp_MOFILES)
387 + AC_SUBST(glibcpp_POFILES)
389 + CLOCALE_H=config/locale/uclibc/c_locale.h
390 + CLOCALE_CC=config/locale/uclibc/c_locale.cc
391 + CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
392 + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
393 + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
394 + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
395 + CMESSAGES_H=config/locale/uclibc/messages_members.h
396 + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
397 + CMONEY_CC=config/locale/uclibc/monetary_members.cc
398 + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
399 + CTIME_H=config/locale/uclibc/time_members.h
400 + CTIME_CC=config/locale/uclibc/time_members.cc
401 + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
402 + ;;
404 echo "$enable_clocale is an unknown locale package" 1>&2
405 exit 1
406 diff -urN gcc-3.3.3-dist/libstdc++-v3/configure gcc-3.3.3/libstdc++-v3/configure
407 --- gcc-3.3.3-dist/libstdc++-v3/configure 2004-01-12 10:18:45.000000000 -0600
408 +++ gcc-3.3.3/libstdc++-v3/configure 2004-08-12 04:49:13.000000000 -0500
409 @@ -2010,6 +2010,11 @@
410 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
413 +linux-uclibc*)
414 + lt_cv_deplibs_check_method=pass_all
415 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
416 + ;;
418 netbsd*)
419 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
420 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
421 @@ -2996,6 +3001,9 @@
423 if test x$enable_clocale_flag = xno; then
424 case x${target_os} in
425 + xlinux-uclibc*)
426 + enable_clocale_flag=uclibc
427 + ;;
428 xlinux* | xgnu*)
429 cat > conftest.$ac_ext <<EOF
430 #line 3002 "configure"
431 @@ -3182,6 +3190,70 @@
432 CTIME_CC=config/locale/generic/time_members.cc
433 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
435 + xuclibc)
436 + echo "$ac_t""uclibc" 1>&6
438 + # Declare intention to use gettext, and add support for specific
439 + # languages.
440 + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
441 + ALL_LINGUAS="de fr"
443 + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
444 + # Extract the first word of "msgfmt", so it can be a program name with args.
445 +set dummy msgfmt; ac_word=$2
446 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
447 +echo "configure:3117: checking for $ac_word" >&5
448 +if eval "test \"`echo '$''{'ac_cv_prog_check_msgfmt'+set}'`\" = set"; then
449 + echo $ac_n "(cached) $ac_c" 1>&6
450 +else
451 + if test -n "$check_msgfmt"; then
452 + ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
453 +else
454 + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
455 + ac_dummy="$PATH"
456 + for ac_dir in $ac_dummy; do
457 + test -z "$ac_dir" && ac_dir=.
458 + if test -f $ac_dir/$ac_word; then
459 + ac_cv_prog_check_msgfmt="yes"
460 + break
461 + fi
462 + done
463 + IFS="$ac_save_ifs"
464 + test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
467 +check_msgfmt="$ac_cv_prog_check_msgfmt"
468 +if test -n "$check_msgfmt"; then
469 + echo "$ac_t""$check_msgfmt" 1>&6
470 +else
471 + echo "$ac_t""no" 1>&6
474 + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
475 + USE_NLS=yes
476 + fi
477 + # Export the build objects.
478 + for ling in $ALL_LINGUAS; do \
479 + glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
480 + glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
481 + done
485 + CLOCALE_H=config/locale/uclibc/c_locale.h
486 + CLOCALE_CC=config/locale/uclibc/c_locale.cc
487 + CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
488 + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
489 + CCOLLATE_CC=config/locale/uclibc/collate_members.cc
490 + CCTYPE_CC=config/locale/uclibc/ctype_members.cc
491 + CMESSAGES_H=config/locale/uclibc/messages_members.h
492 + CMESSAGES_CC=config/locale/uclibc/messages_members.cc
493 + CMONEY_CC=config/locale/uclibc/monetary_members.cc
494 + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
495 + CTIME_H=config/locale/uclibc/time_members.h
496 + CTIME_CC=config/locale/uclibc/time_members.cc
497 + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
498 + ;;
500 echo "$enable_clocale is an unknown locale package" 1>&2
501 exit 1
502 @@ -4212,6 +4284,968 @@
503 # GLIBCPP_CHECK_MATH_SUPPORT
505 case "$target" in
506 + *-uclibc*)
507 + os_include_dir="os/uclibc"
508 + for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
509 + machine/endian.h machine/param.h sys/machine.h sys/types.h \
510 + fp.h locale.h float.h inttypes.h
512 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
513 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
514 +echo "configure:4224: checking for $ac_hdr" >&5
515 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
516 + echo $ac_n "(cached) $ac_c" 1>&6
517 +else
518 + cat > conftest.$ac_ext <<EOF
519 +#line 4229 "configure"
520 +#include "confdefs.h"
521 +#include <$ac_hdr>
522 +EOF
523 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
524 +{ (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
525 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
526 +if test -z "$ac_err"; then
527 + rm -rf conftest*
528 + eval "ac_cv_header_$ac_safe=yes"
529 +else
530 + echo "$ac_err" >&5
531 + echo "configure: failed program was:" >&5
532 + cat conftest.$ac_ext >&5
533 + rm -rf conftest*
534 + eval "ac_cv_header_$ac_safe=no"
536 +rm -f conftest*
538 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
539 + echo "$ac_t""yes" 1>&6
540 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
541 + cat >> confdefs.h <<EOF
542 +#define $ac_tr_hdr 1
543 +EOF
545 +else
546 + echo "$ac_t""no" 1>&6
548 +done
550 + SECTION_FLAGS='-ffunction-sections -fdata-sections'
553 + # If we're not using GNU ld, then there's no point in even trying these
554 + # tests. Check for that first. We should have already tested for gld
555 + # by now (in libtool), but require it now just to be safe...
556 + test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
557 + test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
560 + # The name set by libtool depends on the version of libtool. Shame on us
561 + # for depending on an impl detail, but c'est la vie. Older versions used
562 + # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
563 + # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
564 + # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
565 + # set (hence we're using an older libtool), then set it.
566 + if test x${with_gnu_ld+set} != xset; then
567 + if test x${ac_cv_prog_gnu_ld+set} != xset; then
568 + # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
569 + with_gnu_ld=no
570 + else
571 + with_gnu_ld=$ac_cv_prog_gnu_ld
572 + fi
573 + fi
575 + # Start by getting the version number. I think the libtool test already
576 + # does some of this, but throws away the result.
578 + ldver=`$LD --version 2>/dev/null | head -1 | \
579 + sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
581 + glibcpp_gnu_ld_version=`echo $ldver | \
582 + $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
584 + # Set --gc-sections.
585 + if test "$with_gnu_ld" = "notbroken"; then
586 + # GNU ld it is! Joy and bunny rabbits!
588 + # All these tests are for C++; save the language and the compiler flags.
589 + # Need to do this so that g++ won't try to link in libstdc++
590 + ac_test_CFLAGS="${CFLAGS+set}"
591 + ac_save_CFLAGS="$CFLAGS"
592 + CFLAGS='-x c++ -Wl,--gc-sections'
594 + # Check for -Wl,--gc-sections
595 + # XXX This test is broken at the moment, as symbols required for
596 + # linking are now in libsupc++ (not built yet.....). In addition,
597 + # this test has cored on solaris in the past. In addition,
598 + # --gc-sections doesn't really work at the moment (keeps on discarding
599 + # used sections, first .eh_frame and now some of the glibc sections for
600 + # iconv). Bzzzzt. Thanks for playing, maybe next time.
601 + echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
602 +echo "configure:4312: checking for ld that supports -Wl,--gc-sections" >&5
603 + if test "$cross_compiling" = yes; then
604 + ac_sectionLDflags=yes
605 +else
606 + cat > conftest.$ac_ext <<EOF
607 +#line 4317 "configure"
608 +#include "confdefs.h"
610 + int main(void)
612 + try { throw 1; }
613 + catch (...) { };
614 + return 0;
617 +EOF
618 +if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
619 +then
620 + ac_sectionLDflags=yes
621 +else
622 + echo "configure: failed program was:" >&5
623 + cat conftest.$ac_ext >&5
624 + rm -fr conftest*
625 + ac_sectionLDflags=no
627 +rm -fr conftest*
630 + if test "$ac_test_CFLAGS" = set; then
631 + CFLAGS="$ac_save_CFLAGS"
632 + else
633 + # this is the suspicious part
634 + CFLAGS=''
635 + fi
636 + if test "$ac_sectionLDflags" = "yes"; then
637 + SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
638 + fi
639 + echo "$ac_t""$ac_sectionLDflags" 1>&6
640 + fi
642 + # Set linker optimization flags.
643 + if test x"$with_gnu_ld" = x"yes"; then
644 + OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
645 + fi
651 + echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
652 +echo "configure:4362: checking for main in -lm" >&5
653 +ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
654 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
655 + echo $ac_n "(cached) $ac_c" 1>&6
656 +else
657 + ac_save_LIBS="$LIBS"
658 +LIBS="-lm $LIBS"
659 +cat > conftest.$ac_ext <<EOF
660 +#line 4370 "configure"
661 +#include "confdefs.h"
663 +int main() {
664 +main()
665 +; return 0; }
666 +EOF
667 +if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
668 + rm -rf conftest*
669 + eval "ac_cv_lib_$ac_lib_var=yes"
670 +else
671 + echo "configure: failed program was:" >&5
672 + cat conftest.$ac_ext >&5
673 + rm -rf conftest*
674 + eval "ac_cv_lib_$ac_lib_var=no"
676 +rm -f conftest*
677 +LIBS="$ac_save_LIBS"
680 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
681 + echo "$ac_t""yes" 1>&6
682 + ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
683 + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
684 + cat >> confdefs.h <<EOF
685 +#define $ac_tr_lib 1
686 +EOF
688 + LIBS="-lm $LIBS"
690 +else
691 + echo "$ac_t""no" 1>&6
694 + for ac_func in nan copysignf
696 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
697 +echo "configure:4407: checking for $ac_func" >&5
698 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
699 + echo $ac_n "(cached) $ac_c" 1>&6
700 +else
701 + cat > conftest.$ac_ext <<EOF
702 +#line 4412 "configure"
703 +#include "confdefs.h"
704 +/* System header to define __stub macros and hopefully few prototypes,
705 + which can conflict with char $ac_func(); below. */
706 +#include <assert.h>
707 +/* Override any gcc2 internal prototype to avoid an error. */
708 +/* We use char because int might match the return type of a gcc2
709 + builtin and then its argument prototype would still apply. */
710 +char $ac_func();
712 +int main() {
714 +/* The GNU C library defines this for functions which it implements
715 + to always fail with ENOSYS. Some functions are actually named
716 + something starting with __ and the normal name is an alias. */
717 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
718 +choke me
719 +#else
720 +$ac_func();
721 +#endif
723 +; return 0; }
724 +EOF
725 +if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
726 + rm -rf conftest*
727 + eval "ac_cv_func_$ac_func=yes"
728 +else
729 + echo "configure: failed program was:" >&5
730 + cat conftest.$ac_ext >&5
731 + rm -rf conftest*
732 + eval "ac_cv_func_$ac_func=no"
734 +rm -f conftest*
737 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
738 + echo "$ac_t""yes" 1>&6
739 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
740 + cat >> confdefs.h <<EOF
741 +#define $ac_tr_func 1
742 +EOF
744 +else
745 + echo "$ac_t""no" 1>&6
746 +LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
748 +done
751 + for ac_func in __signbit
753 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
754 +echo "configure:4464: checking for $ac_func" >&5
755 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
756 + echo $ac_n "(cached) $ac_c" 1>&6
757 +else
758 + cat > conftest.$ac_ext <<EOF
759 +#line 4469 "configure"
760 +#include "confdefs.h"
761 +/* System header to define __stub macros and hopefully few prototypes,
762 + which can conflict with char $ac_func(); below. */
763 +#include <assert.h>
764 +/* Override any gcc2 internal prototype to avoid an error. */
765 +/* We use char because int might match the return type of a gcc2
766 + builtin and then its argument prototype would still apply. */
767 +char $ac_func();
769 +int main() {
771 +/* The GNU C library defines this for functions which it implements
772 + to always fail with ENOSYS. Some functions are actually named
773 + something starting with __ and the normal name is an alias. */
774 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
775 +choke me
776 +#else
777 +$ac_func();
778 +#endif
780 +; return 0; }
781 +EOF
782 +if { (eval echo configure:4492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
783 + rm -rf conftest*
784 + eval "ac_cv_func_$ac_func=yes"
785 +else
786 + echo "configure: failed program was:" >&5
787 + cat conftest.$ac_ext >&5
788 + rm -rf conftest*
789 + eval "ac_cv_func_$ac_func=no"
791 +rm -f conftest*
794 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
795 + echo "$ac_t""yes" 1>&6
796 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
797 + cat >> confdefs.h <<EOF
798 +#define $ac_tr_func 1
799 +EOF
801 +else
802 + echo "$ac_t""no" 1>&6
803 +LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
805 +done
807 + for ac_func in __signbitf
809 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
810 +echo "configure:4520: checking for $ac_func" >&5
811 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
812 + echo $ac_n "(cached) $ac_c" 1>&6
813 +else
814 + cat > conftest.$ac_ext <<EOF
815 +#line 4525 "configure"
816 +#include "confdefs.h"
817 +/* System header to define __stub macros and hopefully few prototypes,
818 + which can conflict with char $ac_func(); below. */
819 +#include <assert.h>
820 +/* Override any gcc2 internal prototype to avoid an error. */
821 +/* We use char because int might match the return type of a gcc2
822 + builtin and then its argument prototype would still apply. */
823 +char $ac_func();
825 +int main() {
827 +/* The GNU C library defines this for functions which it implements
828 + to always fail with ENOSYS. Some functions are actually named
829 + something starting with __ and the normal name is an alias. */
830 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
831 +choke me
832 +#else
833 +$ac_func();
834 +#endif
836 +; return 0; }
837 +EOF
838 +if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
839 + rm -rf conftest*
840 + eval "ac_cv_func_$ac_func=yes"
841 +else
842 + echo "configure: failed program was:" >&5
843 + cat conftest.$ac_ext >&5
844 + rm -rf conftest*
845 + eval "ac_cv_func_$ac_func=no"
847 +rm -f conftest*
850 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
851 + echo "$ac_t""yes" 1>&6
852 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
853 + cat >> confdefs.h <<EOF
854 +#define $ac_tr_func 1
855 +EOF
857 +else
858 + echo "$ac_t""no" 1>&6
859 +LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
861 +done
864 + if test x$ac_cv_func_copysignl = x"yes"; then
865 + for ac_func in __signbitl
867 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
868 +echo "configure:4578: checking for $ac_func" >&5
869 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
870 + echo $ac_n "(cached) $ac_c" 1>&6
871 +else
872 + cat > conftest.$ac_ext <<EOF
873 +#line 4583 "configure"
874 +#include "confdefs.h"
875 +/* System header to define __stub macros and hopefully few prototypes,
876 + which can conflict with char $ac_func(); below. */
877 +#include <assert.h>
878 +/* Override any gcc2 internal prototype to avoid an error. */
879 +/* We use char because int might match the return type of a gcc2
880 + builtin and then its argument prototype would still apply. */
881 +char $ac_func();
883 +int main() {
885 +/* The GNU C library defines this for functions which it implements
886 + to always fail with ENOSYS. Some functions are actually named
887 + something starting with __ and the normal name is an alias. */
888 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
889 +choke me
890 +#else
891 +$ac_func();
892 +#endif
894 +; return 0; }
895 +EOF
896 +if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
897 + rm -rf conftest*
898 + eval "ac_cv_func_$ac_func=yes"
899 +else
900 + echo "configure: failed program was:" >&5
901 + cat conftest.$ac_ext >&5
902 + rm -rf conftest*
903 + eval "ac_cv_func_$ac_func=no"
905 +rm -f conftest*
908 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
909 + echo "$ac_t""yes" 1>&6
910 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
911 + cat >> confdefs.h <<EOF
912 +#define $ac_tr_func 1
913 +EOF
915 +else
916 + echo "$ac_t""no" 1>&6
917 +LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
919 +done
921 + fi
923 + if test -n "$LIBMATHOBJS"; then
924 + need_libmath=yes
925 + fi
929 +if test "$need_libmath" = yes; then
930 + GLIBCPP_BUILD_LIBMATH_TRUE=
931 + GLIBCPP_BUILD_LIBMATH_FALSE='#'
932 +else
933 + GLIBCPP_BUILD_LIBMATH_TRUE='#'
934 + GLIBCPP_BUILD_LIBMATH_FALSE=
938 + enable_wchar_t=no
940 + echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
941 +echo "configure:4651: checking for mbstate_t" >&5
942 + cat > conftest.$ac_ext <<EOF
943 +#line 4653 "configure"
944 +#include "confdefs.h"
945 +#include <wchar.h>
946 +int main() {
947 +mbstate_t teststate;
948 +; return 0; }
949 +EOF
950 +if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
951 + rm -rf conftest*
952 + have_mbstate_t=yes
953 +else
954 + echo "configure: failed program was:" >&5
955 + cat conftest.$ac_ext >&5
956 + rm -rf conftest*
957 + have_mbstate_t=no
959 +rm -f conftest*
960 + echo "$ac_t""$have_mbstate_t" 1>&6
961 + if test x"$have_mbstate_t" = xyes; then
962 + cat >> confdefs.h <<\EOF
963 +#define HAVE_MBSTATE_T 1
964 +EOF
966 + fi
968 + for ac_hdr in wchar.h
970 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
971 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
972 +echo "configure:4682: checking for $ac_hdr" >&5
973 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
974 + echo $ac_n "(cached) $ac_c" 1>&6
975 +else
976 + cat > conftest.$ac_ext <<EOF
977 +#line 4687 "configure"
978 +#include "confdefs.h"
979 +#include <$ac_hdr>
980 +EOF
981 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
982 +{ (eval echo configure:4692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
983 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
984 +if test -z "$ac_err"; then
985 + rm -rf conftest*
986 + eval "ac_cv_header_$ac_safe=yes"
987 +else
988 + echo "$ac_err" >&5
989 + echo "configure: failed program was:" >&5
990 + cat conftest.$ac_ext >&5
991 + rm -rf conftest*
992 + eval "ac_cv_header_$ac_safe=no"
994 +rm -f conftest*
996 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
997 + echo "$ac_t""yes" 1>&6
998 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
999 + cat >> confdefs.h <<EOF
1000 +#define $ac_tr_hdr 1
1001 +EOF
1002 + ac_has_wchar_h=yes
1003 +else
1004 + echo "$ac_t""no" 1>&6
1005 +ac_has_wchar_h=no
1007 +done
1009 + for ac_hdr in wctype.h
1011 +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1012 +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1013 +echo "configure:4723: checking for $ac_hdr" >&5
1014 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1015 + echo $ac_n "(cached) $ac_c" 1>&6
1016 +else
1017 + cat > conftest.$ac_ext <<EOF
1018 +#line 4728 "configure"
1019 +#include "confdefs.h"
1020 +#include <$ac_hdr>
1021 +EOF
1022 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1023 +{ (eval echo configure:4733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1024 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1025 +if test -z "$ac_err"; then
1026 + rm -rf conftest*
1027 + eval "ac_cv_header_$ac_safe=yes"
1028 +else
1029 + echo "$ac_err" >&5
1030 + echo "configure: failed program was:" >&5
1031 + cat conftest.$ac_ext >&5
1032 + rm -rf conftest*
1033 + eval "ac_cv_header_$ac_safe=no"
1035 +rm -f conftest*
1037 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1038 + echo "$ac_t""yes" 1>&6
1039 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1040 + cat >> confdefs.h <<EOF
1041 +#define $ac_tr_hdr 1
1042 +EOF
1043 + ac_has_wctype_h=yes
1044 +else
1045 + echo "$ac_t""no" 1>&6
1046 +ac_has_wctype_h=no
1048 +done
1051 + if test x"$ac_has_wchar_h" = xyes &&
1052 + test x"$ac_has_wctype_h" = xyes &&
1053 + test x"$enable_c_mbchar" != xno; then
1055 + echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
1056 +echo "configure:4766: checking for WCHAR_MIN and WCHAR_MAX" >&5
1057 + cat > conftest.$ac_ext <<EOF
1058 +#line 4768 "configure"
1059 +#include "confdefs.h"
1060 +#include <wchar.h>
1061 +int main() {
1062 +int i = WCHAR_MIN; int j = WCHAR_MAX;
1063 +; return 0; }
1064 +EOF
1065 +if { (eval echo configure:4775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1066 + rm -rf conftest*
1067 + has_wchar_minmax=yes
1068 +else
1069 + echo "configure: failed program was:" >&5
1070 + cat conftest.$ac_ext >&5
1071 + rm -rf conftest*
1072 + has_wchar_minmax=no
1074 +rm -f conftest*
1075 + echo "$ac_t""$has_wchar_minmax" 1>&6
1077 + echo $ac_n "checking for WEOF""... $ac_c" 1>&6
1078 +echo "configure:4788: checking for WEOF" >&5
1079 + cat > conftest.$ac_ext <<EOF
1080 +#line 4790 "configure"
1081 +#include "confdefs.h"
1083 + #include <wchar.h>
1084 + #include <stddef.h>
1085 +int main() {
1086 +wint_t i = WEOF;
1087 +; return 0; }
1088 +EOF
1089 +if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1090 + rm -rf conftest*
1091 + has_weof=yes
1092 +else
1093 + echo "configure: failed program was:" >&5
1094 + cat conftest.$ac_ext >&5
1095 + rm -rf conftest*
1096 + has_weof=no
1098 +rm -f conftest*
1099 + echo "$ac_t""$has_weof" 1>&6
1101 + ac_wfuncs=yes
1102 + for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
1104 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1105 +echo "configure:4815: checking for $ac_func" >&5
1106 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1107 + echo $ac_n "(cached) $ac_c" 1>&6
1108 +else
1109 + cat > conftest.$ac_ext <<EOF
1110 +#line 4820 "configure"
1111 +#include "confdefs.h"
1112 +/* System header to define __stub macros and hopefully few prototypes,
1113 + which can conflict with char $ac_func(); below. */
1114 +#include <assert.h>
1115 +/* Override any gcc2 internal prototype to avoid an error. */
1116 +/* We use char because int might match the return type of a gcc2
1117 + builtin and then its argument prototype would still apply. */
1118 +char $ac_func();
1120 +int main() {
1122 +/* The GNU C library defines this for functions which it implements
1123 + to always fail with ENOSYS. Some functions are actually named
1124 + something starting with __ and the normal name is an alias. */
1125 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1126 +choke me
1127 +#else
1128 +$ac_func();
1129 +#endif
1131 +; return 0; }
1132 +EOF
1133 +if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1134 + rm -rf conftest*
1135 + eval "ac_cv_func_$ac_func=yes"
1136 +else
1137 + echo "configure: failed program was:" >&5
1138 + cat conftest.$ac_ext >&5
1139 + rm -rf conftest*
1140 + eval "ac_cv_func_$ac_func=no"
1142 +rm -f conftest*
1145 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1146 + echo "$ac_t""yes" 1>&6
1147 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1148 + cat >> confdefs.h <<EOF
1149 +#define $ac_tr_func 1
1150 +EOF
1152 +else
1153 + echo "$ac_t""no" 1>&6
1155 + ac_wfuncs=no
1157 +done
1160 + for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
1161 + fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
1162 + vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
1163 + mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
1164 + wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
1165 + wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
1167 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1168 +echo "configure:4878: checking for $ac_func" >&5
1169 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1170 + echo $ac_n "(cached) $ac_c" 1>&6
1171 +else
1172 + cat > conftest.$ac_ext <<EOF
1173 +#line 4883 "configure"
1174 +#include "confdefs.h"
1175 +/* System header to define __stub macros and hopefully few prototypes,
1176 + which can conflict with char $ac_func(); below. */
1177 +#include <assert.h>
1178 +/* Override any gcc2 internal prototype to avoid an error. */
1179 +/* We use char because int might match the return type of a gcc2
1180 + builtin and then its argument prototype would still apply. */
1181 +char $ac_func();
1183 +int main() {
1185 +/* The GNU C library defines this for functions which it implements
1186 + to always fail with ENOSYS. Some functions are actually named
1187 + something starting with __ and the normal name is an alias. */
1188 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1189 +choke me
1190 +#else
1191 +$ac_func();
1192 +#endif
1194 +; return 0; }
1195 +EOF
1196 +if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1197 + rm -rf conftest*
1198 + eval "ac_cv_func_$ac_func=yes"
1199 +else
1200 + echo "configure: failed program was:" >&5
1201 + cat conftest.$ac_ext >&5
1202 + rm -rf conftest*
1203 + eval "ac_cv_func_$ac_func=no"
1205 +rm -f conftest*
1208 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1209 + echo "$ac_t""yes" 1>&6
1210 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1211 + cat >> confdefs.h <<EOF
1212 +#define $ac_tr_func 1
1213 +EOF
1215 +else
1216 + echo "$ac_t""no" 1>&6
1218 + ac_wfuncs=no
1220 +done
1223 + echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
1224 +echo "configure:4934: checking for ISO C99 wchar_t support" >&5
1225 + if test x"$has_weof" = xyes &&
1226 + test x"$has_wchar_minmax" = xyes &&
1227 + test x"$ac_wfuncs" = xyes; then
1228 + ac_isoC99_wchar_t=yes
1229 + else
1230 + ac_isoC99_wchar_t=no
1231 + fi
1232 + echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
1234 + ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
1235 +echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
1236 +echo "configure:4946: checking for iconv.h" >&5
1237 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1238 + echo $ac_n "(cached) $ac_c" 1>&6
1239 +else
1240 + cat > conftest.$ac_ext <<EOF
1241 +#line 4951 "configure"
1242 +#include "confdefs.h"
1243 +#include <iconv.h>
1244 +EOF
1245 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1246 +{ (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1247 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1248 +if test -z "$ac_err"; then
1249 + rm -rf conftest*
1250 + eval "ac_cv_header_$ac_safe=yes"
1251 +else
1252 + echo "$ac_err" >&5
1253 + echo "configure: failed program was:" >&5
1254 + cat conftest.$ac_ext >&5
1255 + rm -rf conftest*
1256 + eval "ac_cv_header_$ac_safe=no"
1258 +rm -f conftest*
1260 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1261 + echo "$ac_t""yes" 1>&6
1262 + ac_has_iconv_h=yes
1263 +else
1264 + echo "$ac_t""no" 1>&6
1265 +ac_has_iconv_h=no
1268 + ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
1269 +echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
1270 +echo "configure:4980: checking for langinfo.h" >&5
1271 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1272 + echo $ac_n "(cached) $ac_c" 1>&6
1273 +else
1274 + cat > conftest.$ac_ext <<EOF
1275 +#line 4985 "configure"
1276 +#include "confdefs.h"
1277 +#include <langinfo.h>
1278 +EOF
1279 +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1280 +{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1281 +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1282 +if test -z "$ac_err"; then
1283 + rm -rf conftest*
1284 + eval "ac_cv_header_$ac_safe=yes"
1285 +else
1286 + echo "$ac_err" >&5
1287 + echo "configure: failed program was:" >&5
1288 + cat conftest.$ac_ext >&5
1289 + rm -rf conftest*
1290 + eval "ac_cv_header_$ac_safe=no"
1292 +rm -f conftest*
1294 +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1295 + echo "$ac_t""yes" 1>&6
1296 + ac_has_langinfo_h=yes
1297 +else
1298 + echo "$ac_t""no" 1>&6
1299 +ac_has_langinfo_h=no
1303 + echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
1304 +echo "configure:5014: checking for iconv in -liconv" >&5
1305 +ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
1306 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1307 + echo $ac_n "(cached) $ac_c" 1>&6
1308 +else
1309 + ac_save_LIBS="$LIBS"
1310 +LIBS="-liconv $LIBS"
1311 +cat > conftest.$ac_ext <<EOF
1312 +#line 5022 "configure"
1313 +#include "confdefs.h"
1314 +/* Override any gcc2 internal prototype to avoid an error. */
1315 +/* We use char because int might match the return type of a gcc2
1316 + builtin and then its argument prototype would still apply. */
1317 +char iconv();
1319 +int main() {
1320 +iconv()
1321 +; return 0; }
1322 +EOF
1323 +if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1324 + rm -rf conftest*
1325 + eval "ac_cv_lib_$ac_lib_var=yes"
1326 +else
1327 + echo "configure: failed program was:" >&5
1328 + cat conftest.$ac_ext >&5
1329 + rm -rf conftest*
1330 + eval "ac_cv_lib_$ac_lib_var=no"
1332 +rm -f conftest*
1333 +LIBS="$ac_save_LIBS"
1336 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1337 + echo "$ac_t""yes" 1>&6
1338 + libiconv="-liconv"
1339 +else
1340 + echo "$ac_t""no" 1>&6
1343 + ac_save_LIBS="$LIBS"
1344 + LIBS="$LIBS $libiconv"
1346 + for ac_func in iconv_open iconv_close iconv nl_langinfo
1348 +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1349 +echo "configure:5059: checking for $ac_func" >&5
1350 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1351 + echo $ac_n "(cached) $ac_c" 1>&6
1352 +else
1353 + cat > conftest.$ac_ext <<EOF
1354 +#line 5064 "configure"
1355 +#include "confdefs.h"
1356 +/* System header to define __stub macros and hopefully few prototypes,
1357 + which can conflict with char $ac_func(); below. */
1358 +#include <assert.h>
1359 +/* Override any gcc2 internal prototype to avoid an error. */
1360 +/* We use char because int might match the return type of a gcc2
1361 + builtin and then its argument prototype would still apply. */
1362 +char $ac_func();
1364 +int main() {
1366 +/* The GNU C library defines this for functions which it implements
1367 + to always fail with ENOSYS. Some functions are actually named
1368 + something starting with __ and the normal name is an alias. */
1369 +#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1370 +choke me
1371 +#else
1372 +$ac_func();
1373 +#endif
1375 +; return 0; }
1376 +EOF
1377 +if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1378 + rm -rf conftest*
1379 + eval "ac_cv_func_$ac_func=yes"
1380 +else
1381 + echo "configure: failed program was:" >&5
1382 + cat conftest.$ac_ext >&5
1383 + rm -rf conftest*
1384 + eval "ac_cv_func_$ac_func=no"
1386 +rm -f conftest*
1389 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1390 + echo "$ac_t""yes" 1>&6
1391 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1392 + cat >> confdefs.h <<EOF
1393 +#define $ac_tr_func 1
1394 +EOF
1396 + ac_XPG2funcs=yes
1397 +else
1398 + echo "$ac_t""no" 1>&6
1399 +ac_XPG2funcs=no
1401 +done
1404 + LIBS="$ac_save_LIBS"
1406 + echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
1407 +echo "configure:5117: checking for XPG2 wchar_t support" >&5
1408 + if test x"$ac_has_iconv_h" = xyes &&
1409 + test x"$ac_has_langinfo_h" = xyes &&
1410 + test x"$ac_XPG2funcs" = xyes; then
1411 + ac_XPG2_wchar_t=yes
1412 + else
1413 + ac_XPG2_wchar_t=no
1414 + fi
1415 + echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
1417 + if test x"$ac_isoC99_wchar_t" = xyes &&
1418 + test x"$ac_XPG2_wchar_t" = xyes; then
1419 + cat >> confdefs.h <<\EOF
1420 +#define _GLIBCPP_USE_WCHAR_T 1
1421 +EOF
1423 + enable_wchar_t=yes
1424 + fi
1425 + fi
1426 + echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
1427 +echo "configure:5137: checking for enabled wchar_t specializations" >&5
1428 + echo "$ac_t""$enable_wchar_t" 1>&6
1431 +if test "$enable_wchar_t" = yes; then
1432 + GLIBCPP_TEST_WCHAR_T_TRUE=
1433 + GLIBCPP_TEST_WCHAR_T_FALSE='#'
1434 +else
1435 + GLIBCPP_TEST_WCHAR_T_TRUE='#'
1436 + GLIBCPP_TEST_WCHAR_T_FALSE=
1437 +fi
1440 + cat >> confdefs.h <<\EOF
1441 +#define HAVE_COPYSIGN 1
1442 +EOF
1444 + cat >> confdefs.h <<\EOF
1445 +#define HAVE_FINITE 1
1446 +EOF
1448 + cat >> confdefs.h <<\EOF
1449 +#define HAVE_FINITEF 1
1450 +EOF
1452 + cat >> confdefs.h <<\EOF
1453 +#define HAVE_ISINF 1
1454 +EOF
1456 + cat >> confdefs.h <<\EOF
1457 +#define HAVE_ISINFF 1
1458 +EOF
1460 + cat >> confdefs.h <<\EOF
1461 +#define HAVE_ISNAN 1
1462 +EOF
1464 + cat >> confdefs.h <<\EOF
1465 +#define HAVE_ISNANF 1
1466 +EOF
1467 + ;;
1468 *-linux*)
1469 os_include_dir="os/gnu-linux"
1470 for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
1471 diff -urN gcc-3.3.3-dist/libstdc++-v3/configure.in gcc-3.3.3/libstdc++-v3/configure.in
1472 --- gcc-3.3.3-dist/libstdc++-v3/configure.in 2004-01-12 10:19:22.000000000 -0600
1473 +++ gcc-3.3.3/libstdc++-v3/configure.in 2004-08-12 04:47:51.000000000 -0500
1474 @@ -117,6 +117,36 @@
1475 # GLIBCPP_CHECK_MATH_SUPPORT
1477 case "$target" in
1478 + *-uclibc*)
1479 + os_include_dir="os/uclibc"
1480 + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
1481 + machine/endian.h machine/param.h sys/machine.h sys/types.h \
1482 + fp.h locale.h float.h inttypes.h])
1483 + SECTION_FLAGS='-ffunction-sections -fdata-sections'
1484 + AC_SUBST(SECTION_FLAGS)
1485 + GLIBCPP_CHECK_LINKER_FEATURES
1486 + GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
1487 + GLIBCPP_CHECK_WCHAR_T_SUPPORT
1489 + AC_DEFINE(HAVE_COPYSIGN)
1490 + #AC_DEFINE(HAVE_COPYSIGNF)
1491 + AC_DEFINE(HAVE_FINITE)
1492 + AC_DEFINE(HAVE_FINITEF)
1493 + #AC_DEFINE(HAVE_FREXPF)
1494 + #AC_DEFINE(HAVE_HYPOTF)
1495 + AC_DEFINE(HAVE_ISINF)
1496 + AC_DEFINE(HAVE_ISINFF)
1497 + AC_DEFINE(HAVE_ISNAN)
1498 + AC_DEFINE(HAVE_ISNANF)
1499 + #AC_DEFINE(HAVE_SINCOS)
1500 + #AC_DEFINE(HAVE_SINCOSF)
1501 + #if test x"long_double_math_on_this_cpu" = x"yes"; then
1502 + #AC_DEFINE(HAVE_FINITEL)
1503 + #AC_DEFINE(HAVE_HYPOTL)
1504 + #AC_DEFINE(HAVE_ISINFL)
1505 + #AC_DEFINE(HAVE_ISNANL)
1506 + #fi
1507 + ;;
1508 *-linux*)
1509 os_include_dir="os/gnu-linux"
1510 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
1511 diff -urN gcc-3.3.3-dist/libstdc++-v3/configure.target gcc-3.3.3/libstdc++-v3/configure.target
1512 --- gcc-3.3.3-dist/libstdc++-v3/configure.target 2003-10-01 14:07:07.000000000 -0500
1513 +++ gcc-3.3.3/libstdc++-v3/configure.target 2004-08-12 04:47:51.000000000 -0500
1514 @@ -133,6 +133,9 @@
1515 freebsd*)
1516 os_include_dir="os/bsd/freebsd"
1518 + linux-uclibc*)
1519 + os_include_dir="os/uclibc"
1520 + ;;
1521 gnu* | linux*)
1522 os_include_dir="os/gnu-linux"
1524 diff -urN gcc-3.3.3-dist/libstdc++-v3/include/c_std/std_cstdlib.h gcc-3.3.3/libstdc++-v3/include/c_std/std_cstdlib.h
1525 --- gcc-3.3.3-dist/libstdc++-v3/include/c_std/std_cstdlib.h 2003-04-18 05:08:05.000000000 -0500
1526 +++ gcc-3.3.3/libstdc++-v3/include/c_std/std_cstdlib.h 2004-08-12 04:47:51.000000000 -0500
1527 @@ -101,9 +101,11 @@
1528 using ::labs;
1529 using ::ldiv;
1530 using ::malloc;
1531 +#if _GLIBCPP_USE_WCHAR_T
1532 using ::mblen;
1533 using ::mbstowcs;
1534 using ::mbtowc;
1535 +#endif
1536 using ::qsort;
1537 using ::rand;
1538 using ::realloc;
1539 @@ -112,8 +114,10 @@
1540 using ::strtol;
1541 using ::strtoul;
1542 using ::system;
1543 +#if _GLIBCPP_USE_WCHAR_T
1544 using ::wcstombs;
1545 using ::wctomb;
1546 +#endif
1548 inline long
1549 abs(long __i) { return labs(__i); }
1550 diff -urN gcc-3.3.3-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.3.3/libstdc++-v3/include/c_std/std_cwchar.h
1551 --- gcc-3.3.3-dist/libstdc++-v3/include/c_std/std_cwchar.h 2003-04-18 05:08:05.000000000 -0500
1552 +++ gcc-3.3.3/libstdc++-v3/include/c_std/std_cwchar.h 2004-08-12 04:47:51.000000000 -0500
1553 @@ -165,7 +165,9 @@
1554 using ::wcscoll;
1555 using ::wcscpy;
1556 using ::wcscspn;
1557 +#ifdef HAVE_WCSFTIME
1558 using ::wcsftime;
1559 +#endif
1560 using ::wcslen;
1561 using ::wcsncat;
1562 using ::wcsncmp;
1563 diff -urN gcc-3.3.3-dist/libtool.m4 gcc-3.3.3/libtool.m4
1564 --- gcc-3.3.3-dist/libtool.m4 2003-09-09 03:04:17.000000000 -0500
1565 +++ gcc-3.3.3/libtool.m4 2004-08-12 04:47:51.000000000 -0500
1566 @@ -687,6 +687,11 @@
1567 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1570 +linux-uclibc*)
1571 + lt_cv_deplibs_check_method=pass_all
1572 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1573 + ;;
1575 netbsd*)
1576 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1577 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
1578 diff -urN gcc-3.3.3-dist/ltconfig gcc-3.3.3/ltconfig
1579 --- gcc-3.3.3-dist/ltconfig 2003-02-19 20:10:02.000000000 -0600
1580 +++ gcc-3.3.3/ltconfig 2004-08-12 04:47:51.000000000 -0500
1581 @@ -603,6 +603,7 @@
1582 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1583 case $host_os in
1584 linux-gnu*) ;;
1585 +linux-uclibc*) ;;
1586 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1587 esac
1589 @@ -1247,6 +1248,24 @@
1590 dynamic_linker='GNU/Linux ld.so'
1593 +linux-uclibc*)
1594 + version_type=linux
1595 + need_lib_prefix=no
1596 + need_version=no
1597 + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1598 + soname_spec='${libname}${release}.so$major'
1599 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1600 + shlibpath_var=LD_LIBRARY_PATH
1601 + shlibpath_overrides_runpath=no
1602 + # This implies no fast_install, which is unacceptable.
1603 + # Some rework will be needed to allow for fast_install
1604 + # before this can be enabled.
1605 + # Note: copied from linux-gnu, and may not be appropriate.
1606 + hardcode_into_libs=yes
1607 + # Assume using the uClibc dynamic linker.
1608 + dynamic_linker="uClibc ld.so"
1609 + ;;
1611 netbsd*)
1612 need_lib_prefix=no
1613 need_version=no