summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-05-03 04:22:24 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-05-03 04:22:24 +0000
commit0a7a816eb4f9fcab905d6db9d170821cc3f3abf8 (patch)
treecb5f354924401451c9740290937ac180d492b78a /toolchain
parent027b6883e6837a44c1ae184339291ea315e674a3 (diff)
New patches for GCC-4.1.0 for locale and configuration.
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/gcc/4.1.0/100-uclibc-conf.patch381
-rw-r--r--toolchain/gcc/4.1.0/200-uclibc-locale.patch311
2 files changed, 402 insertions, 290 deletions
diff --git a/toolchain/gcc/4.1.0/100-uclibc-conf.patch b/toolchain/gcc/4.1.0/100-uclibc-conf.patch
index 9436c7d1c..47f635944 100644
--- a/toolchain/gcc/4.1.0/100-uclibc-conf.patch
+++ b/toolchain/gcc/4.1.0/100-uclibc-conf.patch
@@ -1,6 +1,6 @@
-diff -urN gcc-4.1.0/boehm-gc/configure gcc-4.1.0-patched/boehm-gc/configure
---- gcc-4.1.0/boehm-gc/configure 2005-04-13 19:31:24.000000000 -0500
-+++ gcc-4.1.0-patched/boehm-gc/configure 2005-04-25 20:47:19.919723167 -0500
+diff -urN gcc-4.0.0-dist/boehm-gc/configure gcc-4.0.0/boehm-gc/configure
+--- gcc-4.0.0-dist/boehm-gc/configure 2005-04-21 02:04:10.000000000 -0500
++++ gcc-4.0.0/boehm-gc/configure 2005-04-30 13:22:27.495094224 -0500
@@ -4320,6 +4320,11 @@
lt_cv_deplibs_check_method=pass_all
;;
@@ -13,9 +13,47 @@ diff -urN gcc-4.1.0/boehm-gc/configure gcc-4.1.0-patched/boehm-gc/configure
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
-diff -urN gcc-4.1.0/gcc/config/arm/linux-elf.h gcc-4.1.0-patched/gcc/config/arm/linux-elf.h
---- gcc-4.1.0/gcc/config/arm/linux-elf.h 2005-03-02 10:27:42.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/arm/linux-elf.h 2005-04-25 20:45:31.795953620 -0500
+diff -urN gcc-4.0.0-dist/configure gcc-4.0.0/configure
+--- gcc-4.0.0-dist/configure 2005-04-21 02:04:10.000000000 -0500
++++ gcc-4.0.0/configure 2005-04-30 12:27:56.000000000 -0500
+@@ -1136,7 +1136,7 @@
+ ;;
+ "")
+ case "${target}" in
+- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
++ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
+ # Enable libmudflap by default in GNU and friends.
+ ;;
+ *-*-freebsd*)
+diff -urN gcc-4.0.0-dist/configure.in gcc-4.0.0/configure.in
+--- gcc-4.0.0-dist/configure.in 2005-04-20 21:45:11.000000000 -0500
++++ gcc-4.0.0/configure.in 2005-04-30 12:22:09.000000000 -0500
+@@ -345,7 +345,7 @@
+ ;;
+ "")
+ case "${target}" in
+- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
++ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
+ # Enable libmudflap by default in GNU and friends.
+ ;;
+ *-*-freebsd*)
+diff -urN gcc-4.0.0-dist/contrib/regression/objs-gcc.sh gcc-4.0.0/contrib/regression/objs-gcc.sh
+--- gcc-4.0.0-dist/contrib/regression/objs-gcc.sh 2002-10-11 15:23:21.000000000 -0500
++++ gcc-4.0.0/contrib/regression/objs-gcc.sh 2005-04-30 12:29:58.000000000 -0500
+@@ -105,6 +105,10 @@
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
+diff -urN gcc-4.0.0-dist/gcc/config/arm/linux-elf.h gcc-4.0.0/gcc/config/arm/linux-elf.h
+--- gcc-4.0.0-dist/gcc/config/arm/linux-elf.h 2005-03-04 10:14:01.000000000 -0600
++++ gcc-4.0.0/gcc/config/arm/linux-elf.h 2005-04-28 20:30:00.000000000 -0500
@@ -82,6 +82,18 @@
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
@@ -43,10 +81,10 @@ diff -urN gcc-4.1.0/gcc/config/arm/linux-elf.h gcc-4.1.0-patched/gcc/config/arm/
#define TARGET_OS_CPP_BUILTINS() \
do \
-diff -urN gcc-4.1.0/gcc/config/cris/linux.h gcc-4.1.0-patched/gcc/config/cris/linux.h
---- gcc-4.1.0/gcc/config/cris/linux.h 2005-04-23 23:01:27.000000000 -0500
-+++ gcc-4.1.0-patched/gcc/config/cris/linux.h 2005-04-25 20:45:31.796953451 -0500
-@@ -73,6 +73,25 @@
+diff -urN gcc-4.0.0-dist/gcc/config/cris/linux.h gcc-4.0.0/gcc/config/cris/linux.h
+--- gcc-4.0.0-dist/gcc/config/cris/linux.h 2003-11-28 21:08:09.000000000 -0600
++++ gcc-4.0.0/gcc/config/cris/linux.h 2005-04-28 20:30:00.000000000 -0500
+@@ -79,6 +79,25 @@
#undef CRIS_DEFAULT_CPU_VERSION
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
@@ -72,7 +110,7 @@ diff -urN gcc-4.1.0/gcc/config/cris/linux.h gcc-4.1.0-patched/gcc/config/cris/li
#undef CRIS_SUBTARGET_VERSION
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
-@@ -87,6 +106,8 @@
+@@ -93,6 +112,8 @@
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
%{!r:%{O2|O3: --gc-sections}}"
@@ -81,41 +119,31 @@ diff -urN gcc-4.1.0/gcc/config/cris/linux.h gcc-4.1.0-patched/gcc/config/cris/li
/* Node: Run-time Target */
-diff -urN gcc-4.1.0/gcc/config/cris/t-linux-uclibc gcc-4.1.0-patched/gcc/config/cris/t-linux-uclibc
---- gcc-4.1.0/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/cris/t-linux-uclibc 2005-04-25 20:45:31.797953283 -0500
+diff -urN gcc-4.0.0-dist/gcc/config/cris/t-linux-uclibc gcc-4.0.0/gcc/config/cris/t-linux-uclibc
+--- gcc-4.0.0-dist/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/gcc/config/cris/t-linux-uclibc 2005-04-28 20:30:00.000000000 -0500
@@ -0,0 +1,3 @@
+T_CFLAGS = -DUSE_UCLIBC
+TARGET_LIBGCC2_CFLAGS += -fPIC
+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
-diff -urN gcc-4.1.0/gcc/config/i386/linux.h gcc-4.1.0-patched/gcc/config/i386/linux.h
---- gcc-4.1.0/gcc/config/i386/linux.h 2004-11-27 10:45:14.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/i386/linux.h 2005-04-25 21:21:05.828409973 -0500
-@@ -104,8 +104,13 @@
-
- /* If ELF is the default format, we should not use /lib/elf. */
+diff -urN gcc-4.0.0-dist/gcc/config/i386/linux.h gcc-4.0.0/gcc/config/i386/linux.h
+--- gcc-4.0.0-dist/gcc/config/i386/linux.h 2004-11-27 10:45:14.000000000 -0600
++++ gcc-4.0.0/gcc/config/i386/linux.h 2005-04-28 20:30:00.000000000 -0500
+@@ -107,6 +107,11 @@
+ #define LINK_EMULATION "elf_i386"
+ #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#if defined USE_UCLIBC
-+#define LINK_EMULATION "elf_i386"
++#undef DYNAMIC_LINKER
+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#else
- #define LINK_EMULATION "elf_i386"
- #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
-
++
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
-@@ -144,6 +149,7 @@
- } \
- } while (0)
- #endif
-+#endif
-
- /* Handle special EH pointer encodings. Absolute, pc-relative, and
- indirect are handled automatically. */
-diff -urN gcc-4.1.0/gcc/config/mips/linux.h gcc-4.1.0-patched/gcc/config/mips/linux.h
---- gcc-4.1.0/gcc/config/mips/linux.h 2005-01-25 20:04:46.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/mips/linux.h 2005-04-25 20:45:31.809951259 -0500
+ { "link_emulation", LINK_EMULATION },\
+diff -urN gcc-4.0.0-dist/gcc/config/mips/linux.h gcc-4.0.0/gcc/config/mips/linux.h
+--- gcc-4.0.0-dist/gcc/config/mips/linux.h 2005-01-25 20:04:46.000000000 -0600
++++ gcc-4.0.0/gcc/config/mips/linux.h 2005-04-28 20:30:00.000000000 -0500
@@ -108,6 +108,17 @@
/* Borrowed from sparc/linux.h */
@@ -142,9 +170,9 @@ diff -urN gcc-4.1.0/gcc/config/mips/linux.h gcc-4.1.0-patched/gcc/config/mips/li
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "%{mabi=64: -64} %{!mno-abicalls:-KPIC}"
-diff -urN gcc-4.1.0/gcc/config/rs6000/linux.h gcc-4.1.0-patched/gcc/config/rs6000/linux.h
---- gcc-4.1.0/gcc/config/rs6000/linux.h 2004-12-01 20:21:28.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/rs6000/linux.h 2005-04-25 20:45:31.810951091 -0500
+diff -urN gcc-4.0.0-dist/gcc/config/rs6000/linux.h gcc-4.0.0/gcc/config/rs6000/linux.h
+--- gcc-4.0.0-dist/gcc/config/rs6000/linux.h 2004-12-01 20:21:28.000000000 -0600
++++ gcc-4.0.0/gcc/config/rs6000/linux.h 2005-04-28 20:30:00.000000000 -0500
@@ -69,7 +69,11 @@
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
@@ -157,10 +185,10 @@ diff -urN gcc-4.1.0/gcc/config/rs6000/linux.h gcc-4.1.0-patched/gcc/config/rs600
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
-diff -urN gcc-4.1.0/gcc/config/rs6000/sysv4.h gcc-4.1.0-patched/gcc/config/rs6000/sysv4.h
---- gcc-4.1.0/gcc/config/rs6000/sysv4.h 2005-04-13 19:26:50.000000000 -0500
-+++ gcc-4.1.0-patched/gcc/config/rs6000/sysv4.h 2005-04-25 20:45:31.812950754 -0500
-@@ -957,6 +957,7 @@
+diff -urN gcc-4.0.0-dist/gcc/config/rs6000/sysv4.h gcc-4.0.0/gcc/config/rs6000/sysv4.h
+--- gcc-4.0.0-dist/gcc/config/rs6000/sysv4.h 2005-02-15 09:53:52.000000000 -0600
++++ gcc-4.0.0/gcc/config/rs6000/sysv4.h 2005-04-28 20:30:00.000000000 -0500
+@@ -956,6 +956,7 @@
mcall-linux : %(link_os_linux) ; \
mcall-gnu : %(link_os_gnu) ; \
mcall-netbsd : %(link_os_netbsd) ; \
@@ -168,7 +196,7 @@ diff -urN gcc-4.1.0/gcc/config/rs6000/sysv4.h gcc-4.1.0-patched/gcc/config/rs600
mcall-openbsd: %(link_os_openbsd) ; \
: %(link_os_default) }"
-@@ -1135,6 +1136,10 @@
+@@ -1134,6 +1135,10 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
@@ -179,7 +207,7 @@ diff -urN gcc-4.1.0/gcc/config/rs6000/sysv4.h gcc-4.1.0-patched/gcc/config/rs600
#if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif
-@@ -1301,6 +1306,7 @@
+@@ -1300,6 +1305,7 @@
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
@@ -187,10 +215,10 @@ diff -urN gcc-4.1.0/gcc/config/rs6000/sysv4.h gcc-4.1.0-patched/gcc/config/rs600
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
-diff -urN gcc-4.1.0/gcc/config/sh/linux.h gcc-4.1.0-patched/gcc/config/sh/linux.h
---- gcc-4.1.0/gcc/config/sh/linux.h 2005-02-28 21:39:03.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/sh/linux.h 2005-04-25 20:45:31.814950416 -0500
-@@ -55,12 +55,21 @@
+diff -urN gcc-4.0.0-dist/gcc/config/sh/linux.h gcc-4.0.0/gcc/config/sh/linux.h
+--- gcc-4.0.0-dist/gcc/config/sh/linux.h 2005-01-25 20:04:48.000000000 -0600
++++ gcc-4.0.0/gcc/config/sh/linux.h 2005-04-28 20:30:00.000000000 -0500
+@@ -67,12 +67,21 @@
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
#undef SUBTARGET_LINK_SPEC
@@ -210,12 +238,12 @@ diff -urN gcc-4.1.0/gcc/config/sh/linux.h gcc-4.1.0-patched/gcc/config/sh/linux.
%{static:-static}"
+#endif
- /* Output assembler code to STREAM to call the profiler. */
-
-diff -urN gcc-4.1.0/gcc/config/sh/t-linux-uclibc gcc-4.1.0-patched/gcc/config/sh/t-linux-uclibc
---- gcc-4.1.0/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/sh/t-linux-uclibc 2005-04-25 20:45:31.814950416 -0500
-@@ -0,0 +1,13 @@
+ #undef LIB_SPEC
+ #define LIB_SPEC \
+diff -urN gcc-4.0.0-dist/gcc/config/sh/t-linux-uclibc gcc-4.0.0/gcc/config/sh/t-linux-uclibc
+--- gcc-4.0.0-dist/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/gcc/config/sh/t-linux-uclibc 2005-04-28 20:30:00.000000000 -0500
+@@ -0,0 +1,47 @@
+T_CFLAGS = -DUSE_UCLIBC
+
+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
@@ -223,32 +251,49 @@ diff -urN gcc-4.1.0/gcc/config/sh/t-linux-uclibc gcc-4.1.0-patched/gcc/config/sh
+
+LIB2FUNCS_EXTRA=
+
-+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
+MULTILIB_DIRNAMES=
+MULTILIB_MATCHES =
+MULTILIB_EXCEPTIONS=
+
+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
-diff -urN gcc-4.1.0/gcc/config/sh/t-sh64-uclibc gcc-4.1.0-patched/gcc/config/sh/t-sh64-uclibc
---- gcc-4.1.0/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/sh/t-sh64-uclibc 2005-04-25 20:45:31.815950248 -0500
-@@ -0,0 +1,13 @@
-+EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
+
-+LIB1ASMFUNCS = \
-+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
-+ _shcompact_call_trampoline _shcompact_return_trampoline \
-+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
-+ _push_pop_shmedia_regs \
-+ _udivdi3 _divdi3 _umoddi3 _moddi3
++# Override t-slibgcc-elf-ver to export some libgcc symbols with
++# the symbol versions that glibc used, and hide some lib1func
++# routines which should not be called via PLT. We have to create
++# the list from scratch.
++SHLIB_MAPFILES = \
++ $(srcdir)/libgcc-std.ver \
++ $(srcdir)/config/sh/libgcc-excl.ver \
++ $(srcdir)/config/sh/libgcc-glibc.ver
+
-+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
-+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
-+MULTILIB_MATCHES=
-+MULTILIB_EXCEPTIONS=
-diff -urN gcc-4.1.0/gcc/config/t-linux-uclibc gcc-4.1.0-patched/gcc/config/t-linux-uclibc
---- gcc-4.1.0/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/gcc/config/t-linux-uclibc 2005-04-25 20:45:31.815950248 -0500
++# Override SHLIB_LINK and SHLIB_INSTALL to use linker script
++# libgcc_s.so.
++SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
++ -Wl,--soname=$(SHLIB_SONAME) \
++ -Wl,--version-script=$(SHLIB_MAP) \
++ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
++ $(SHLIB_OBJS) $(SHLIB_LC) && \
++ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
++ if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
++ mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
++ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
++ else true; fi && \
++ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
++ (echo "/* GNU ld script"; \
++ echo " Use the shared library, but some functions are only in"; \
++ echo " the static library. */"; \
++ echo "GROUP ( $(SHLIB_SONAME) libgcc.a )" \
++ ) > $(SHLIB_DIR)/$(SHLIB_SOLINK)
++SHLIB_INSTALL = \
++ $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
++ $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
++ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
++ rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
++ $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SOLINK) \
++ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+diff -urN gcc-4.0.0-dist/gcc/config/t-linux-uclibc gcc-4.0.0/gcc/config/t-linux-uclibc
+--- gcc-4.0.0-dist/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
++++ gcc-4.0.0/gcc/config/t-linux-uclibc 2005-04-28 20:30:00.000000000 -0500
@@ -0,0 +1,15 @@
+T_CFLAGS = -DUSE_UCLIBC
+
@@ -265,41 +310,26 @@ diff -urN gcc-4.1.0/gcc/config/t-linux-uclibc gcc-4.1.0-patched/gcc/config/t-lin
+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
-diff -urN gcc-4.1.0/gcc/config.gcc gcc-4.1.0-patched/gcc/config.gcc
---- gcc-4.1.0/gcc/config.gcc 2005-04-23 23:01:23.000000000 -0500
-+++ gcc-4.1.0-patched/gcc/config.gcc 2005-04-25 21:12:43.375594576 -0500
-@@ -448,7 +448,14 @@
+diff -urN gcc-4.0.0-dist/gcc/config.gcc gcc-4.0.0/gcc/config.gcc
+--- gcc-4.0.0-dist/gcc/config.gcc 2005-03-30 21:17:08.000000000 -0600
++++ gcc-4.0.0/gcc/config.gcc 2005-04-28 20:30:00.000000000 -0500
+@@ -439,7 +439,12 @@
case ${enable_threads} in
"" | yes | posix) thread_file='posix' ;;
esac
- tmake_file="t-slibgcc-elf-ver t-linux"
+ case ${target} in
-+ *-linux*uclibc*)
-+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
-+ ;;
++ *-*-linux-uclibc*)
++ tmake_file="t-slibgcc-elf-ver t-linux-uclibc" ;;
+ *)
-+ tmake_file="t-slibgcc-elf-ver t-linux"
-+ ;;
++ tmake_file="t-slibgcc-elf-ver t-linux" ;;
+ esac
;;
*-*-gnu*)
# On the Hurd, the setup is just about the same on
-@@ -667,6 +674,12 @@
- extra_parts=""
- use_collect2=yes
- ;;
-+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
-+ 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"
-+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
-+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
-+ gnu_ld=yes
-+ ;;
- arm*-*-linux*) # ARM GNU/Linux with ELF
- 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"
- tmake_file="${tmake_file} arm/t-arm arm/t-linux"
-@@ -765,6 +778,10 @@
+@@ -744,6 +749,10 @@
+ tmake_file="cris/t-cris cris/t-elfmulti"
gas=yes
- extra_options="${extra_options} cris/elf.opt"
;;
+cris-*-linux-uclibc*)
+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
@@ -308,59 +338,94 @@ diff -urN gcc-4.1.0/gcc/config.gcc gcc-4.1.0-patched/gcc/config.gcc
cris-*-linux*)
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
# We need to avoid using t-linux, so override default tmake_file
-@@ -1443,6 +1460,16 @@
- gnu_ld=yes
- gas=yes
- ;;
-+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
-+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
-+ case ${target} in
-+ mipsisa32*-*)
-+ target_cpu_default="MASK_SOFT_FLOAT"
-+ tm_defines="MIPS_ISA_DEFAULT=32"
-+ ;;
-+ esac
-+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc"
-+ ;;
- mips*-*-linux*) # Linux MIPS, either endian.
- tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
- case ${target} in
-@@ -1659,6 +1686,10 @@
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
- tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
- ;;
-+powerpc-*-linux-uclibc*)
-+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
-+ tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
-+ ;;
- powerpc-*-linux*)
- tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
- tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
-@@ -1821,6 +1852,8 @@
+@@ -1780,6 +1789,8 @@
esac
tm_file="${tm_file} sh/elf.h"
case ${target} in
-+ sh*-*-linux-uclibc*) tmake_file="${tmake_file} t-linux-uclibc sh/t-linux-uclibc"
-+ tm_file="${tm_file} linux.h sh/linux.h" ;;
++ sh*-*-linux-uclibc*) tmake_file="${tmake_file} sh/t-linux-uclibc"
++ tm_file="${tm_file} sh/linux.h" ;;
sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
- tm_file="${tm_file} linux.h sh/linux.h" ;;
+ tm_file="${tm_file} sh/linux.h" ;;
sh*-*-kaos*) tm_file="${tm_file} sh/embed-elf.h kaos.h sh/kaos-sh.h"
-@@ -1840,6 +1873,11 @@
- *-*-netbsd)
- tmake_file="${tmake_file} sh/t-netbsd"
- ;;
-+ sh64*-*-linux-uclibc*)
-+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
-+ tm_file="${tm_file} sh/sh64.h"
-+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
-+ ;;
- sh64*-*-linux*)
- tmake_file="${tmake_file} sh/t-sh64 sh/t-linux64"
- tm_file="${tm_file} sh/sh64.h"
-diff -urN gcc-4.1.0/libtool.m4 gcc-4.1.0-patched/libtool.m4
---- gcc-4.1.0/libtool.m4 2005-04-13 19:31:24.000000000 -0500
-+++ gcc-4.1.0-patched/libtool.m4 2005-04-25 20:47:51.679369687 -0500
-@@ -743,6 +743,11 @@
+diff -urN gcc-4.0.0-dist/libffi/configure gcc-4.0.0/libffi/configure
+--- gcc-4.0.0-dist/libffi/configure 2004-12-02 05:04:21.000000000 -0600
++++ gcc-4.0.0/libffi/configure 2005-04-30 12:18:05.000000000 -0500
+@@ -3457,6 +3457,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN gcc-4.0.0-dist/libgfortran/configure gcc-4.0.0/libgfortran/configure
+--- gcc-4.0.0-dist/libgfortran/configure 2005-04-21 02:04:10.000000000 -0500
++++ gcc-4.0.0/libgfortran/configure 2005-04-30 12:26:15.000000000 -0500
+@@ -3684,6 +3684,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN gcc-4.0.0-dist/libjava/configure gcc-4.0.0/libjava/configure
+--- gcc-4.0.0-dist/libjava/configure 2005-04-21 02:04:10.000000000 -0500
++++ gcc-4.0.0/libjava/configure 2005-04-30 12:27:15.000000000 -0500
+@@ -4354,6 +4354,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN gcc-4.0.0-dist/libmudflap/configure gcc-4.0.0/libmudflap/configure
+--- gcc-4.0.0-dist/libmudflap/configure 2005-01-02 16:24:50.000000000 -0600
++++ gcc-4.0.0/libmudflap/configure 2005-04-30 12:25:24.000000000 -0500
+@@ -5380,6 +5380,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN gcc-4.0.0-dist/libobjc/configure gcc-4.0.0/libobjc/configure
+--- gcc-4.0.0-dist/libobjc/configure 2005-04-21 02:04:10.000000000 -0500
++++ gcc-4.0.0/libobjc/configure 2005-04-30 12:25:55.000000000 -0500
+@@ -3283,6 +3283,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+diff -urN gcc-4.0.0-dist/libtool.m4 gcc-4.0.0/libtool.m4
+--- gcc-4.0.0-dist/libtool.m4 2004-11-29 17:45:17.000000000 -0600
++++ gcc-4.0.0/libtool.m4 2005-04-30 12:28:32.000000000 -0500
+@@ -682,6 +682,11 @@
lt_cv_deplibs_check_method=pass_all
;;
@@ -372,9 +437,9 @@ diff -urN gcc-4.1.0/libtool.m4 gcc-4.1.0-patched/libtool.m4
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
-diff -urN gcc-4.1.0/ltconfig gcc-4.1.0-patched/ltconfig
---- gcc-4.1.0/ltconfig 2004-10-02 11:33:06.000000000 -0500
-+++ gcc-4.1.0-patched/ltconfig 2005-04-25 20:45:31.836946707 -0500
+diff -urN gcc-4.0.0-dist/ltconfig gcc-4.0.0/ltconfig
+--- gcc-4.0.0-dist/ltconfig 2004-10-02 11:33:06.000000000 -0500
++++ gcc-4.0.0/ltconfig 2005-04-30 13:26:08.000000000 -0500
@@ -602,6 +602,7 @@
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
@@ -383,7 +448,7 @@ diff -urN gcc-4.1.0/ltconfig gcc-4.1.0-patched/ltconfig
linux-gnu*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
-@@ -1273,6 +1274,24 @@
+@@ -1273,6 +1274,23 @@
dynamic_linker='GNU/Linux ld.so'
;;
@@ -399,7 +464,6 @@ diff -urN gcc-4.1.0/ltconfig gcc-4.1.0-patched/ltconfig
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
-+ # Note: copied from linux-gnu, and may not be appropriate.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
@@ -408,3 +472,18 @@ diff -urN gcc-4.1.0/ltconfig gcc-4.1.0-patched/ltconfig
netbsd*)
need_lib_prefix=no
need_version=no
+diff -urN gcc-4.0.0-dist/zlib/configure gcc-4.0.0/zlib/configure
+--- gcc-4.0.0-dist/zlib/configure 2004-11-24 16:04:38.000000000 -0600
++++ gcc-4.0.0/zlib/configure 2005-04-30 12:30:40.000000000 -0500
+@@ -3426,6 +3426,11 @@
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff --git a/toolchain/gcc/4.1.0/200-uclibc-locale.patch b/toolchain/gcc/4.1.0/200-uclibc-locale.patch
index a9cf297aa..bba729ce7 100644
--- a/toolchain/gcc/4.1.0/200-uclibc-locale.patch
+++ b/toolchain/gcc/4.1.0/200-uclibc-locale.patch
@@ -1,6 +1,6 @@
diff -urN gcc-4.1.0/libstdc++-v3/acinclude.m4 gcc-4.1.0-patched/libstdc++-v3/acinclude.m4
--- gcc-4.1.0/libstdc++-v3/acinclude.m4 2005-04-11 19:13:06.000000000 -0500
-+++ gcc-4.1.0-patched/libstdc++-v3/acinclude.m4 2005-04-27 22:20:27.569248995 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/acinclude.m4 2005-04-30 19:36:16.917899167 -0500
@@ -1047,7 +1047,7 @@
AC_MSG_CHECKING([for C locale to use])
GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
@@ -64,11 +64,11 @@ diff -urN gcc-4.1.0/libstdc++-v3/acinclude.m4 gcc-4.1.0-patched/libstdc++-v3/aci
# This is where the testsuite looks for locale catalogs, using the
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2005-04-27 22:20:27.571248664 -0500
-@@ -0,0 +1,59 @@
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2005-04-30 19:36:16.918898999 -0500
+@@ -0,0 +1,63 @@
+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
+
-+// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
@@ -97,6 +97,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4
+
+// Written by Jakub Jelinek <jakub@redhat.com>
+
++#include <bits/c++config.h>
+#include <clocale>
+
+#ifdef __UCLIBC_MJN3_ONLY__
@@ -105,7 +106,6 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4
+
+#ifdef __UCLIBC_HAS_XLOCALE__
+
-+extern "C" __typeof(iswctype_l) __iswctype_l;
+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
+extern "C" __typeof(strcoll_l) __strcoll_l;
+extern "C" __typeof(strftime_l) __strftime_l;
@@ -113,21 +113,25 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4
+extern "C" __typeof(strtof_l) __strtof_l;
+extern "C" __typeof(strtold_l) __strtold_l;
+extern "C" __typeof(strxfrm_l) __strxfrm_l;
++extern "C" __typeof(newlocale) __newlocale;
++extern "C" __typeof(freelocale) __freelocale;
++extern "C" __typeof(duplocale) __duplocale;
++extern "C" __typeof(uselocale) __uselocale;
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++extern "C" __typeof(iswctype_l) __iswctype_l;
+extern "C" __typeof(towlower_l) __towlower_l;
+extern "C" __typeof(towupper_l) __towupper_l;
+extern "C" __typeof(wcscoll_l) __wcscoll_l;
+extern "C" __typeof(wcsftime_l) __wcsftime_l;
+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
+extern "C" __typeof(wctype_l) __wctype_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
++#endif
+
+#endif // GLIBC 2.3 and later
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c_locale.cc
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c_locale.cc 2005-04-27 22:20:27.572248498 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c_locale.cc 2005-04-30 19:36:16.919898830 -0500
@@ -0,0 +1,160 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
@@ -291,11 +295,11 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0-patc
+} // namespace std
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c_locale.h
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c_locale.h 2005-04-27 22:20:27.573248332 -0500
-@@ -0,0 +1,115 @@
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/c_locale.h 2005-04-30 19:36:16.920898661 -0500
+@@ -0,0 +1,117 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
@@ -379,8 +383,10 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0-patch
+ // be avoided.
+ template<typename _Tv>
+ int
-+ __convert_from_v(char* __out, const int __size, const char* __fmt,
-+#ifdef __UCLIBC_HAS_XLOCALE__
++ __convert_from_v(char* __out,
++ const int __size __attribute__ ((__unused__)),
++ const char* __fmt,
++#ifdef __UCLIBC_HAS_XCLOCALE__
+ _Tv __v, const __c_locale& __cloc, int __prec)
+ {
+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
@@ -397,7 +403,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0-patch
+
+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
+
-+#ifdef __UCLIBC_HAS_XLOCALE__
++#ifdef __UCLIBC_HAS_XCLOCALE__
+ __gnu_cxx::__uselocale(__old);
+#elif defined __UCLIBC_HAS_LOCALE__
+ std::setlocale(LC_ALL, __sav);
@@ -410,7 +416,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0-patch
+#endif
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2005-04-27 22:20:27.574248167 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2005-04-30 19:36:16.921898492 -0500
@@ -0,0 +1,306 @@
+// std::codecvt implementation details, GNU version -*- C++ -*-
+
@@ -720,7 +726,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.1
+}
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/collate_members.cc
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/collate_members.cc 2005-04-27 22:20:27.575248001 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/collate_members.cc 2005-04-30 19:36:16.922898323 -0500
@@ -0,0 +1,80 @@
+// std::collate implementation details, GNU version -*- C++ -*-
+
@@ -804,7 +810,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.1
+}
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/ctype_members.cc
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2005-04-27 22:20:27.595244687 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2005-04-30 19:36:16.923898155 -0500
@@ -0,0 +1,300 @@
+// std::ctype implementation details, GNU version -*- C++ -*-
+
@@ -914,7 +920,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.0
+ __ret = __wctype_l("graph", _M_c_locale_ctype);
+ break;
+ default:
-+ __ret = 0;
++ __ret = __wmask_type();
+ }
+ return __ret;
+ }
@@ -1108,7 +1114,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.0
+}
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/messages_members.cc
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/messages_members.cc 2005-04-27 22:20:27.618240876 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/messages_members.cc 2005-04-30 19:36:16.925897817 -0500
@@ -0,0 +1,100 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
@@ -1212,7 +1218,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.
+}
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/messages_members.h
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/messages_members.h 2005-04-27 22:20:27.619240710 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/messages_members.h 2005-04-30 19:36:16.925897817 -0500
@@ -0,0 +1,118 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
@@ -1334,8 +1340,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.1
+ }
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/monetary_members.cc
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2005-04-27 22:20:27.621240379 -0500
-@@ -0,0 +1,698 @@
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2005-04-30 19:36:16.927897479 -0500
+@@ -0,0 +1,692 @@
+// std::moneypunct implementation details, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
@@ -1721,12 +1727,9 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ // Use ctype::widen code without the facet...
-+ unsigned char uc;
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ {
-+ uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
-+ _M_data->_M_atoms[__i] = btowc(uc);
-+ }
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
+ }
+ else
+ {
@@ -1751,12 +1754,12 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+# endif
+#else
-+ union __s_and_w { const char *__s; unsigned int __w; } __u;
++ union { char *__s; wchar_t __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
++ _M_data->_M_decimal_point = __u.__w;
+
+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
++ _M_data->_M_thousands_sep = __u.__w;
+#endif
+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
@@ -1879,12 +1882,9 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.
+ _M_data->_M_neg_format = money_base::_S_default_pattern;
+
+ // Use ctype::widen code without the facet...
-+ unsigned char uc;
+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ {
-+ uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
-+ _M_data->_M_atoms[__i] = btowc(uc);
-+ }
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
+ }
+ else
+ {
@@ -1909,12 +1909,12 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+# endif
+#else
-+ union __s_and_w { const char *__s; unsigned int __w; } __u;
++ union { char *__s; wchar_t __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
++ _M_data->_M_decimal_point = __u.__w;
+
+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
++ _M_data->_M_thousands_sep = __u.__w;
+#endif
+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
@@ -2036,8 +2036,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.
+}
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/numeric_members.cc
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2005-04-27 22:20:27.623240047 -0500
-@@ -0,0 +1,183 @@
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2005-04-30 19:36:38.467261324 -0500
+@@ -0,0 +1,160 @@
+// std::numpunct implementation details, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
@@ -2129,10 +2129,10 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1
+ // NB: There is no way to extact this info from posix locales.
+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
+ _M_data->_M_truename = "true";
-+ _M_data->_M_truename_size = strlen(_M_data->_M_truename);
++ _M_data->_M_truename_size = 4;
+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
+ _M_data->_M_falsename = "false";
-+ _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
++ _M_data->_M_falsename_size = 5;
+ }
+
+ template<>
@@ -2157,48 +2157,25 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1
+ _M_data->_M_decimal_point = L'.';
+ _M_data->_M_thousands_sep = L',';
+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_S_get_c_locale());
-+#endif
+ // Use ctype::widen code without the facet...
-+ unsigned char uc;
+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ {
-+ uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
-+ _M_data->_M_atoms_out[__i] = btowc(uc);
-+ }
++ _M_data->_M_atoms_out[__i] =
++ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
+
+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ {
-+ uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__j]);
-+ _M_data->_M_atoms_in[__j] = btowc(uc);
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
++ _M_data->_M_atoms_in[__j] =
++ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
+ }
+ else
+ {
+ // Named locale.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union __s_and_w { const char *__s; unsigned int __w; } __u;
++ // NB: In the GNU model wchar_t is always 32 bit wide.
++ union { char *__s; wchar_t __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
++ _M_data->_M_decimal_point = __u.__w;
+
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
-+#endif
++ _M_data->_M_thousands_sep = __u.__w;
+
+ if (_M_data->_M_thousands_sep == L'\0')
+ _M_data->_M_grouping = "";
@@ -2210,10 +2187,10 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1
+ // NB: There is no way to extact this info from posix locales.
+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
+ _M_data->_M_truename = L"true";
-+ _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
++ _M_data->_M_truename_size = 4;
+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
+ _M_data->_M_falsename = L"false";
-+ _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
++ _M_data->_M_falsename_size = 5;
+ }
+
+ template<>
@@ -2223,8 +2200,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1
+}
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/time_members.cc
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/time_members.cc 2005-04-27 22:20:27.624239882 -0500
-@@ -0,0 +1,356 @@
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/time_members.cc 2005-04-30 19:36:16.929897142 -0500
+@@ -0,0 +1,406 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
@@ -2371,7 +2348,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0-
+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
++ __cloc);
+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
@@ -2521,61 +2499,110 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0-
+ {
+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
+
-+ _M_data->_M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc));
-+ _M_data->_M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
-+ _M_data->_M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc));
-+ _M_data->_M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
-+ _M_data->_M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
-+ _M_data->_M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
-+ _M_data->_M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc));
-+ _M_data->_M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc));
-+ _M_data->_M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
++ union { char *__s; wchar_t *__w; } __u;
++
++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
++ _M_data->_M_date_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
++ _M_data->_M_date_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
++ _M_data->_M_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
++ _M_data->_M_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
++ _M_data->_M_am = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
++ _M_data->_M_pm = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
++ _M_data->_M_am_pm_format = __u.__w;
+
+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc));
-+ _M_data->_M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc));
-+ _M_data->_M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc));
-+ _M_data->_M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc));
-+ _M_data->_M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc));
-+ _M_data->_M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc));
-+ _M_data->_M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc));
++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
++ _M_data->_M_day1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
++ _M_data->_M_day2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
++ _M_data->_M_day3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
++ _M_data->_M_day4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
++ _M_data->_M_day5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
++ _M_data->_M_day6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
++ _M_data->_M_day7 = __u.__w;
+
+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
-+ _M_data->_M_aday2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
-+ _M_data->_M_aday3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
-+ _M_data->_M_aday4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
-+ _M_data->_M_aday5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
-+ _M_data->_M_aday6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
-+ _M_data->_M_aday7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
++ _M_data->_M_aday1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
++ _M_data->_M_aday2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
++ _M_data->_M_aday3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
++ _M_data->_M_aday4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
++ _M_data->_M_aday5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
++ _M_data->_M_aday6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
++ _M_data->_M_aday7 = __u.__w;
+
+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc));
-+ _M_data->_M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc));
-+ _M_data->_M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc));
-+ _M_data->_M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc));
-+ _M_data->_M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc));
-+ _M_data->_M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc));
-+ _M_data->_M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc));
-+ _M_data->_M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc));
-+ _M_data->_M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc));
-+ _M_data->_M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc));
-+ _M_data->_M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc));
-+ _M_data->_M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc));
++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
++ _M_data->_M_month01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
++ _M_data->_M_month02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
++ _M_data->_M_month03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
++ _M_data->_M_month04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
++ _M_data->_M_month05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
++ _M_data->_M_month06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
++ _M_data->_M_month07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
++ _M_data->_M_month08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
++ _M_data->_M_month09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
++ _M_data->_M_month10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
++ _M_data->_M_month11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
++ _M_data->_M_month12 = __u.__w;
+
+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc));
-+ _M_data->_M_amonth02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc));
-+ _M_data->_M_amonth03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc));
-+ _M_data->_M_amonth04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc));
-+ _M_data->_M_amonth05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc));
-+ _M_data->_M_amonth06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc));
-+ _M_data->_M_amonth07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc));
-+ _M_data->_M_amonth08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc));
-+ _M_data->_M_amonth09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc));
-+ _M_data->_M_amonth10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc));
-+ _M_data->_M_amonth11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc));
-+ _M_data->_M_amonth12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc));
++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
++ _M_data->_M_amonth01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
++ _M_data->_M_amonth02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
++ _M_data->_M_amonth03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
++ _M_data->_M_amonth04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
++ _M_data->_M_amonth05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
++ _M_data->_M_amonth06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
++ _M_data->_M_amonth07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
++ _M_data->_M_amonth08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
++ _M_data->_M_amonth09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
++ _M_data->_M_amonth10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
++ _M_data->_M_amonth11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
++ _M_data->_M_amonth12 = __u.__w;
+ }
+#endif // 0
+ }
@@ -2583,7 +2610,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0-
+}
diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/time_members.h
--- gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/time_members.h 2005-04-27 22:20:27.625239716 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/locale/uclibc/time_members.h 2005-04-30 19:36:16.929897142 -0500
@@ -0,0 +1,68 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
@@ -2655,11 +2682,11 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.1.0-p
+ }
diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_base.h
--- gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_base.h 2005-04-27 22:20:27.626239550 -0500
-@@ -0,0 +1,58 @@
++++ gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_base.h 2005-04-30 19:36:16.930896973 -0500
+@@ -0,0 +1,64 @@
+// Locale support -*- C++ -*-
+
-+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
@@ -2691,8 +2718,14 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.0-patched
+// ISO C++ 14882: 22.1 Locales
+//
+
++/** @file ctype_base.h
++ * This is an internal header file, included by other library headers.
++ * You should not attempt to use it directly.
++ */
++
+// Information as gleaned from /usr/include/ctype.h
+
++ /// @brief Base class for ctype.
+ struct ctype_base
+ {
+ // Note: In uClibc, the following two types depend on configuration.
@@ -2717,7 +2750,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.0-patched
+ };
diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_inline.h
--- gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_inline.h 2005-04-27 22:20:27.626239550 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_inline.h 2005-04-30 19:36:16.931896804 -0500
@@ -0,0 +1,69 @@
+// Locale support -*- C++ -*-
+
@@ -2790,7 +2823,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.1.0-patch
+ }
diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_noninline.h
--- gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2005-04-27 22:20:27.627239385 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2005-04-30 19:36:16.931896804 -0500
@@ -0,0 +1,92 @@
+// Locale support -*- C++ -*-
+
@@ -2886,7 +2919,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.1.0-pa
+ }
diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/os_defines.h
--- gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 18:00:00.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/os_defines.h 2005-04-27 22:20:27.628239219 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/config/os/uclibc/os_defines.h 2005-04-30 19:36:16.932896635 -0500
@@ -0,0 +1,44 @@
+// Specific definitions for GNU/Linux -*- C++ -*-
+
@@ -2934,7 +2967,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.1.0-patched
+#endif
diff -urN gcc-4.1.0/libstdc++-v3/configure gcc-4.1.0-patched/libstdc++-v3/configure
--- gcc-4.1.0/libstdc++-v3/configure 2005-04-13 19:31:43.000000000 -0500
-+++ gcc-4.1.0-patched/libstdc++-v3/configure 2005-04-27 22:20:33.285301695 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/configure 2005-04-30 19:36:16.993886339 -0500
@@ -3986,6 +3986,11 @@
lt_cv_deplibs_check_method=pass_all
;;
@@ -3059,7 +3092,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/configure gcc-4.1.0-patched/libstdc++-v3/config
cat >>confdefs.h <<\_ACEOF
diff -urN gcc-4.1.0/libstdc++-v3/configure.host gcc-4.1.0-patched/libstdc++-v3/configure.host
--- gcc-4.1.0/libstdc++-v3/configure.host 2005-01-13 16:48:14.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/configure.host 2005-04-27 22:20:28.088162997 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/configure.host 2005-04-30 19:36:16.996885833 -0500
@@ -249,6 +249,12 @@
;;
esac
@@ -3075,7 +3108,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/configure.host gcc-4.1.0-patched/libstdc++-v3/c
# THIS TABLE IS SORTED. KEEP IT THAT WAY.
diff -urN gcc-4.1.0/libstdc++-v3/crossconfig.m4 gcc-4.1.0-patched/libstdc++-v3/crossconfig.m4
--- gcc-4.1.0/libstdc++-v3/crossconfig.m4 2005-04-06 18:31:16.000000000 -0500
-+++ gcc-4.1.0-patched/libstdc++-v3/crossconfig.m4 2005-04-27 22:20:28.089162832 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/crossconfig.m4 2005-04-30 19:36:16.997885664 -0500
@@ -143,6 +143,99 @@
;;
esac
@@ -3187,7 +3220,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/crossconfig.m4 gcc-4.1.0-patched/libstdc++-v3/c
AC_DEFINE(_GLIBCXX_USE_LFS)
diff -urN gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.0-patched/libstdc++-v3/include/c_compatibility/wchar.h
--- gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h 2003-12-08 21:51:45.000000000 -0600
-+++ gcc-4.1.0-patched/libstdc++-v3/include/c_compatibility/wchar.h 2005-04-27 22:20:28.089162832 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/include/c_compatibility/wchar.h 2005-04-30 19:36:16.997885664 -0500
@@ -101,7 +101,9 @@
using std::wmemcpy;
using std::wmemmove;
@@ -3200,7 +3233,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.0-patch
using std::wcstold;
diff -urN gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.1.0-patched/libstdc++-v3/include/c_std/std_cwchar.h
--- gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h 2004-07-20 03:47:42.000000000 -0500
-+++ gcc-4.1.0-patched/libstdc++-v3/include/c_std/std_cwchar.h 2005-04-27 22:20:28.090162666 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/include/c_std/std_cwchar.h 2005-04-30 19:36:16.998885495 -0500
@@ -179,7 +179,9 @@
using ::wcscoll;
using ::wcscpy;