diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-03-10 14:05:15 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-03-10 14:05:15 +0000 |
commit | 3f74fed4c41ec318bddcdf3455ac3661db9f004a (patch) | |
tree | cceed228438cf2f0b8c0aedca18bbad41c416700 /toolchain/gcc/4.2.0 | |
parent | f90e0e035b1e8e55b9da4a01fb15017e8dc1b83a (diff) |
Update to use upstream uclibc changes, have to change numbering, 203-204 have to go to other versions as well
Diffstat (limited to 'toolchain/gcc/4.2.0')
-rw-r--r-- | toolchain/gcc/4.2.0/100-uclibc-conf.patch | 441 | ||||
-rw-r--r-- | toolchain/gcc/4.2.0/102-uclibc-conf.patch | 231 | ||||
-rw-r--r-- | toolchain/gcc/4.2.0/103-uclibc-conf-noupstream.patch | 11 | ||||
-rw-r--r-- | toolchain/gcc/4.2.0/202-uclibc-locale.patch (renamed from toolchain/gcc/4.2.0/200-uclibc-locale.patch) | 692 | ||||
-rw-r--r-- | toolchain/gcc/4.2.0/203-uclibc-locale-no__x.patch | 213 | ||||
-rw-r--r-- | toolchain/gcc/4.2.0/204-uclibc-locale-wchar_fix.patch | 48 | ||||
-rw-r--r-- | toolchain/gcc/4.2.0/205-uclibc-locale-update.patch | 424 |
7 files changed, 1045 insertions, 1015 deletions
diff --git a/toolchain/gcc/4.2.0/100-uclibc-conf.patch b/toolchain/gcc/4.2.0/100-uclibc-conf.patch deleted file mode 100644 index a0487059d..000000000 --- a/toolchain/gcc/4.2.0/100-uclibc-conf.patch +++ /dev/null @@ -1,441 +0,0 @@ -diff -ruNp gcc-4.2.0.oorig/boehm-gc/configure gcc-4.2.0/boehm-gc/configure ---- gcc-4.2.0.oorig/boehm-gc/configure 2006-01-26 07:59:58.000000000 +0100 -+++ gcc-4.2.0/boehm-gc/configure 2006-01-28 19:18:19.000000000 +0100 -@@ -4320,6 +4320,11 @@ linux-gnu*) - 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 -ruNp gcc-4.2.0.oorig/contrib/regression/objs-gcc.sh gcc-4.2.0/contrib/regression/objs-gcc.sh ---- gcc-4.2.0.oorig/contrib/regression/objs-gcc.sh 2005-10-31 18:10:00.000000000 +0100 -+++ gcc-4.2.0/contrib/regression/objs-gcc.sh 2006-01-28 19:18:19.000000000 +0100 -@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H - 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 -ruNp gcc-4.2.0.oorig/gcc/config/alpha/linux-elf.h gcc-4.2.0/gcc/config/alpha/linux-elf.h ---- gcc-4.2.0.oorig/gcc/config/alpha/linux-elf.h 2005-10-31 18:00:45.000000000 +0100 -+++ gcc-4.2.0/gcc/config/alpha/linux-elf.h 2006-01-28 19:18:19.000000000 +0100 -@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */ - #define SUBTARGET_EXTRA_SPECS \ - { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, - -+#if defined USE_UCLIBC -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#else - #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#endif - - #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ - %{O*:-O3} %{!O*:-O1} \ -diff -ruNp gcc-4.2.0.oorig/gcc/config/arm/linux-elf.h gcc-4.2.0/gcc/config/arm/linux-elf.h ---- gcc-4.2.0.oorig/gcc/config/arm/linux-elf.h 2005-11-22 14:45:02.000000000 +0100 -+++ gcc-4.2.0/gcc/config/arm/linux-elf.h 2006-01-28 19:18:19.000000000 +0100 -@@ -51,7 +51,11 @@ - - #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" - -+#ifdef USE_UCLIBC -+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" -+#else - #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2" -+#endif - - #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \ - %{b} \ -diff -ruNp gcc-4.2.0.oorig/gcc/config/cris/linux.h gcc-4.2.0/gcc/config/cris/linux.h ---- gcc-4.2.0.oorig/gcc/config/cris/linux.h 2005-11-22 14:45:02.000000000 +0100 -+++ gcc-4.2.0/gcc/config/cris/linux.h 2006-01-28 19:18:19.000000000 +0100 -@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */ - #undef CRIS_DEFAULT_CPU_VERSION - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG - -+#ifdef USE_UCLIBC -+ -+#undef CRIS_SUBTARGET_VERSION -+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" -+ -+#undef CRIS_LINK_SUBTARGET_SPEC -+#define CRIS_LINK_SUBTARGET_SPEC \ -+ "-mcrislinux\ -+ -rpath-link include/asm/../..%s\ -+ %{shared} %{static}\ -+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ -+ %{!shared: \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ -+ %{!r:%{O2|O3: --gc-sections}}" -+ -+#else /* USE_UCLIBC */ -+ - #undef CRIS_SUBTARGET_VERSION - #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" - -@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */ - %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ - %{!r:%{O2|O3: --gc-sections}}" - -+#endif /* USE_UCLIBC */ -+ - - /* Node: Run-time Target */ - -diff -ruNp gcc-4.2.0.oorig/gcc/config/cris/t-linux-uclibc gcc-4.2.0/gcc/config/cris/t-linux-uclibc ---- gcc-4.2.0.oorig/gcc/config/cris/t-linux-uclibc 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.2.0/gcc/config/cris/t-linux-uclibc 2006-01-28 19:18:19.000000000 +0100 -@@ -0,0 +1,3 @@ -+T_CFLAGS = -DUSE_UCLIBC -+TARGET_LIBGCC2_CFLAGS += -fPIC -+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS) -diff -ruNp gcc-4.2.0.oorig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h ---- gcc-4.2.0.oorig/gcc/config/i386/linux64.h 2005-11-22 14:45:00.000000000 +0100 -+++ gcc-4.2.0/gcc/config/i386/linux64.h 2006-01-28 19:18:19.000000000 +0100 -@@ -50,6 +50,15 @@ Boston, MA 02110-1301, USA. */ - done. */ - - #undef LINK_SPEC -+#if defined USE_UCLIBC -+#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ -+ %{shared:-shared} \ -+ %{!shared: \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ -+ %{static:-static}}" -+#else - #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ - %{shared:-shared} \ - %{!shared: \ -@@ -58,6 +67,7 @@ Boston, MA 02110-1301, USA. */ - %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ - %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \ - %{static:-static}}" -+#endif - - /* Similar to standard Linux, but adding -ffast-math support. */ - #undef ENDFILE_SPEC -diff -ruNp gcc-4.2.0.oorig/gcc/config/i386/linux.h gcc-4.2.0/gcc/config/i386/linux.h ---- gcc-4.2.0.oorig/gcc/config/i386/linux.h 2005-11-22 14:45:00.000000000 +0100 -+++ gcc-4.2.0/gcc/config/i386/linux.h 2006-01-28 19:18:19.000000000 +0100 -@@ -102,6 +102,11 @@ Boston, MA 02110-1301, USA. */ - #define LINK_EMULATION "elf_i386" - #define DYNAMIC_LINKER "/lib/ld-linux.so.2" - -+#if defined USE_UCLIBC -+#undef DYNAMIC_LINKER -+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#endif -+ - #undef SUBTARGET_EXTRA_SPECS - #define SUBTARGET_EXTRA_SPECS \ - { "link_emulation", LINK_EMULATION },\ -diff -ruNp gcc-4.2.0.oorig/gcc/config/mips/linux.h gcc-4.2.0/gcc/config/mips/linux.h ---- gcc-4.2.0.oorig/gcc/config/mips/linux.h 2005-11-22 14:45:02.000000000 +0100 -+++ gcc-4.2.0/gcc/config/mips/linux.h 2006-01-28 19:18:19.000000000 +0100 -@@ -100,6 +100,17 @@ Boston, MA 02110-1301, USA. */ - - /* Borrowed from sparc/linux.h */ - #undef LINK_SPEC -+#ifdef USE_UCLIBC -+#define LINK_SPEC \ -+ "%(endian_spec) \ -+ %{shared:-shared} \ -+ %{!shared: \ -+ %{!ibcs: \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ -+ %{static:-static}}}" -+#else - #define LINK_SPEC \ - "%(endian_spec) \ - %{shared:-shared} \ -@@ -109,6 +120,7 @@ Boston, MA 02110-1301, USA. */ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ - %{static:-static}}}" -+#endif - - #undef SUBTARGET_ASM_SPEC - #define SUBTARGET_ASM_SPEC "%{mabi=64: -64} %{!mno-abicalls:-KPIC}" -diff -ruNp gcc-4.2.0.oorig/gcc/config/rs6000/linux.h gcc-4.2.0/gcc/config/rs6000/linux.h ---- gcc-4.2.0.oorig/gcc/config/rs6000/linux.h 2006-01-28 12:58:41.000000000 +0100 -+++ gcc-4.2.0/gcc/config/rs6000/linux.h 2006-01-28 19:18:19.000000000 +0100 -@@ -72,7 +72,11 @@ - #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" - - #undef LINK_OS_DEFAULT_SPEC -+#ifdef USE_UCLIBC -+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" -+#else - #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" -+#endif - - #define LINK_GCC_C_SEQUENCE_SPEC \ - "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" -diff -ruNp gcc-4.2.0.oorig/gcc/config/rs6000/sysv4.h gcc-4.2.0/gcc/config/rs6000/sysv4.h ---- gcc-4.2.0.oorig/gcc/config/rs6000/sysv4.h 2006-01-28 12:58:41.000000000 +0100 -+++ gcc-4.2.0/gcc/config/rs6000/sysv4.h 2006-01-28 19:18:19.000000000 +0100 -@@ -739,6 +739,7 @@ extern int fixuplabelno; - mcall-linux : %(link_os_linux) ; \ - mcall-gnu : %(link_os_gnu) ; \ - mcall-netbsd : %(link_os_netbsd) ; \ -+ mcall-linux-uclibc : %(link_os_linux_uclibc); \ - mcall-openbsd: %(link_os_openbsd) ; \ - : %(link_os_default) }" - -@@ -916,6 +917,10 @@ extern int fixuplabelno; - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" - -+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" -+ - #if defined(HAVE_LD_EH_FRAME_HDR) - # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " - #endif -@@ -1082,6 +1087,7 @@ ncrtn.o%s" - { "link_os_sim", LINK_OS_SIM_SPEC }, \ - { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \ - { "link_os_linux", LINK_OS_LINUX_SPEC }, \ -+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ - { "link_os_gnu", LINK_OS_GNU_SPEC }, \ - { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ -diff -ruNp gcc-4.2.0.oorig/gcc/config/sh/linux.h gcc-4.2.0/gcc/config/sh/linux.h ---- gcc-4.2.0.oorig/gcc/config/sh/linux.h 2005-11-22 14:45:01.000000000 +0100 -+++ gcc-4.2.0/gcc/config/sh/linux.h 2006-01-28 19:18:19.000000000 +0100 -@@ -51,12 +51,21 @@ Boston, MA 02110-1301, USA. */ - #undef SUBTARGET_LINK_EMUL_SUFFIX - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" - #undef SUBTARGET_LINK_SPEC -+#ifdef USE_UCLIBC -+#define SUBTARGET_LINK_SPEC \ -+ "%{shared:-shared} \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ -+ %{static:-static}" -+#else - #define SUBTARGET_LINK_SPEC \ - "%{shared:-shared} \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ - %{static:-static}" -+#endif - - /* Output assembler code to STREAM to call the profiler. */ - -diff -ruNp gcc-4.2.0.oorig/gcc/config/t-linux-uclibc gcc-4.2.0/gcc/config/t-linux-uclibc ---- gcc-4.2.0.oorig/gcc/config/t-linux-uclibc 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.2.0/gcc/config/t-linux-uclibc 2006-01-28 19:18:19.000000000 +0100 -@@ -0,0 +1,15 @@ -+T_CFLAGS = -DUSE_UCLIBC -+ -+# Compile crtbeginS.o and crtendS.o with pic. -+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC -+# Compile libgcc2.a with pic. -+TARGET_LIBGCC2_CFLAGS = -fPIC -+ -+# Override t-slibgcc-elf-ver to export some libgcc symbols with -+# the symbol versions that glibc used. -+#SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver -+ -+# Use unwind-dw2-fde -+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 -ruNp gcc-4.2.0.oorig/gcc/config.gcc gcc-4.2.0/gcc/config.gcc ---- gcc-4.2.0.oorig/gcc/config.gcc 2006-01-20 19:14:30.000000000 +0100 -+++ gcc-4.2.0/gcc/config.gcc 2006-01-28 19:18:19.000000000 +0100 -@@ -451,7 +451,12 @@ case ${target} in - 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" ;; -+ *) -+ tmake_file="t-slibgcc-elf-ver t-linux" ;; -+ esac - ;; - *-*-gnu*) - # On the Hurd, the setup is just about the same on -@@ -789,6 +794,10 @@ cris-*-elf | cris-*-none) - 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" -+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc" -+ ;; - 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 -@@ -1883,7 +1892,7 @@ s390x-ibm-tpf*) - ;; - sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \ - sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ -- sh-*-linux* | sh[346lbe]*-*-linux* | \ -+ sh*-*-linux* | sh[346lbe]*-*-linux* | \ - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ - sh64-*-netbsd* | sh64l*-*-netbsd*) - tmake_file="${tmake_file} sh/t-sh sh/t-elf" -diff -ruNp gcc-4.2.0.oorig/libffi/configure gcc-4.2.0/libffi/configure ---- gcc-4.2.0.oorig/libffi/configure 2006-01-22 12:38:53.000000000 +0100 -+++ gcc-4.2.0/libffi/configure 2006-01-28 19:18:19.000000000 +0100 -@@ -3457,6 +3457,11 @@ linux-gnu*) - 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 -ruNp gcc-4.2.0.oorig/libgfortran/configure gcc-4.2.0/libgfortran/configure ---- gcc-4.2.0.oorig/libgfortran/configure 2006-01-17 12:33:05.000000000 +0100 -+++ gcc-4.2.0/libgfortran/configure 2006-01-28 19:18:19.000000000 +0100 -@@ -3699,6 +3699,11 @@ linux-gnu*) - 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 -ruNp gcc-4.2.0.oorig/libjava/configure gcc-4.2.0/libjava/configure ---- gcc-4.2.0.oorig/libjava/configure 2006-01-24 21:41:59.000000000 +0100 -+++ gcc-4.2.0/libjava/configure 2006-01-28 19:18:19.000000000 +0100 -@@ -5137,6 +5137,11 @@ linux-gnu*) - 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 -ruNp gcc-4.2.0.oorig/libmudflap/configure gcc-4.2.0/libmudflap/configure ---- gcc-4.2.0.oorig/libmudflap/configure 2005-10-31 18:08:44.000000000 +0100 -+++ gcc-4.2.0/libmudflap/configure 2006-01-28 19:18:19.000000000 +0100 -@@ -5382,6 +5382,11 @@ linux-gnu*) - 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 -ruNp gcc-4.2.0.oorig/libobjc/configure gcc-4.2.0/libobjc/configure ---- gcc-4.2.0.oorig/libobjc/configure 2006-01-24 23:36:09.000000000 +0100 -+++ gcc-4.2.0/libobjc/configure 2006-01-28 19:18:19.000000000 +0100 -@@ -3313,6 +3313,11 @@ linux-gnu*) - 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 -ruNp gcc-4.2.0.oorig/libtool.m4 gcc-4.2.0/libtool.m4 ---- gcc-4.2.0.oorig/libtool.m4 2005-10-31 18:19:54.000000000 +0100 -+++ gcc-4.2.0/libtool.m4 2006-01-28 19:18:19.000000000 +0100 -@@ -743,6 +743,11 @@ linux-gnu*) - 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 -ruNp gcc-4.2.0.oorig/ltconfig gcc-4.2.0/ltconfig ---- gcc-4.2.0.oorig/ltconfig 2005-10-31 18:19:54.000000000 +0100 -+++ gcc-4.2.0/ltconfig 2006-01-28 19:18:19.000000000 +0100 -@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in -+linux-uclibc*) ;; - linux-gnu*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac -@@ -1274,6 +1275,23 @@ linux-gnu*) - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -ruNp gcc-4.2.0.oorig/zlib/configure gcc-4.2.0/zlib/configure ---- gcc-4.2.0.oorig/zlib/configure 2005-10-31 18:07:37.000000000 +0100 -+++ gcc-4.2.0/zlib/configure 2006-01-28 19:18:19.000000000 +0100 -@@ -3426,6 +3426,11 @@ linux-gnu*) - 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.2.0/102-uclibc-conf.patch b/toolchain/gcc/4.2.0/102-uclibc-conf.patch new file mode 100644 index 000000000..164ed25f2 --- /dev/null +++ b/toolchain/gcc/4.2.0/102-uclibc-conf.patch @@ -0,0 +1,231 @@ +--- gcc/libgomp/configure.uclibc100~ 2006-03-10 14:42:44 +0100 ++++ gcc/libgomp/configure 2006-03-10 14:42:57 +0100 +@@ -3771,7 +3771,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/gcc/config/cris/linux.h.uclibc100~ 2006-03-06 20:36:46 +0100 ++++ gcc/gcc/config/cris/linux.h 2006-03-10 14:40:13 +0100 +@@ -74,7 +74,11 @@ + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG + + #undef CRIS_SUBTARGET_VERSION +-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" ++#if UCLIBC_DEFAULT ++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" ++#else ++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" ++#endif + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + +--- gcc/libstdc++-v3/configure.uclibc100~ 2006-03-06 21:23:58 +0100 ++++ gcc/libstdc++-v3/configure 2006-03-10 14:40:13 +0100 +@@ -4276,7 +4276,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +@@ -99523,7 +99523,7 @@ + + case "$target" in + *-uclinux*) +- # Don't enable LFS with uClibc ++ # Don't enable LFS with uClinux + ;; + *) + cat >>confdefs.h <<\_ACEOF +--- gcc/libstdc++-v3/crossconfig.m4.uclibc100~ 2006-03-06 21:23:58 +0100 ++++ gcc/libstdc++-v3/crossconfig.m4 2006-03-10 14:40:13 +0100 +@@ -161,7 +161,7 @@ + AC_DEFINE(HAVE_INT64_T) + case "$target" in + *-uclinux*) +- # Don't enable LFS with uClibc ++ # Don't enable LFS with uClinux + ;; + *) + AC_DEFINE(_GLIBCXX_USE_LFS) +--- gcc/zlib/configure.uclibc100~ 2006-03-06 21:27:15 +0100 ++++ gcc/zlib/configure 2006-03-10 14:40:13 +0100 +@@ -3422,7 +3422,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libobjc/configure.uclibc100~ 2006-03-06 21:28:36 +0100 ++++ gcc/libobjc/configure 2006-03-10 14:40:13 +0100 +@@ -3309,7 +3309,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libgfortran/configure.uclibc100~ 2006-03-06 21:35:15 +0100 ++++ gcc/libgfortran/configure 2006-03-10 14:40:14 +0100 +@@ -3695,7 +3695,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libmudflap/configure.uclibc100~ 2006-03-06 21:36:09 +0100 ++++ gcc/libmudflap/configure 2006-03-10 14:40:14 +0100 +@@ -5378,7 +5378,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/boehm-gc/configure.uclibc100~ 2006-03-06 21:38:35 +0100 ++++ gcc/boehm-gc/configure 2006-03-10 14:40:14 +0100 +@@ -4316,7 +4316,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libffi/configure.uclibc100~ 2006-03-06 21:43:16 +0100 ++++ gcc/libffi/configure 2006-03-10 14:40:14 +0100 +@@ -3453,7 +3453,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libssp/configure.uclibc100~ 2006-03-06 21:43:38 +0100 ++++ gcc/libssp/configure 2006-03-10 14:40:14 +0100 +@@ -4409,7 +4409,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/contrib/regression/objs-gcc.sh.uclibc100~ 2006-03-06 21:43:42 +0100 ++++ gcc/contrib/regression/objs-gcc.sh 2006-03-10 14:40:14 +0100 +@@ -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 +--- gcc/libjava/classpath/ltconfig.uclibc100~ 2006-03-06 22:43:49 +0100 ++++ gcc/libjava/classpath/ltconfig 2006-03-10 14:40:14 +0100 +@@ -603,7 +603,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1251,7 +1251,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no +--- gcc/libjava/classpath/configure.uclibc100~ 2006-03-06 22:43:48 +0100 ++++ gcc/libjava/classpath/configure 2006-03-10 14:40:14 +0100 +@@ -4665,7 +4665,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libjava/configure.uclibc100~ 2006-03-10 13:47:50 +0100 ++++ gcc/libjava/configure 2006-03-10 14:40:14 +0100 +@@ -5212,7 +5212,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libgcc-math/configure.uclibc100~ 2006-03-10 14:43:03 +0100 ++++ gcc/libgcc-math/configure 2006-03-10 14:43:11 +0100 +@@ -3829,7 +3829,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/libtool.m4.uclibc100~ 2006-03-06 22:53:26 +0100 ++++ gcc/libtool.m4 2006-03-10 14:40:14 +0100 +@@ -739,7 +739,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +--- gcc/ltconfig.uclibc100~ 2006-03-06 22:53:26 +0100 ++++ gcc/ltconfig 2006-03-10 14:40:14 +0100 +@@ -603,7 +603,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1251,7 +1251,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no diff --git a/toolchain/gcc/4.2.0/103-uclibc-conf-noupstream.patch b/toolchain/gcc/4.2.0/103-uclibc-conf-noupstream.patch new file mode 100644 index 000000000..09c9bbecf --- /dev/null +++ b/toolchain/gcc/4.2.0/103-uclibc-conf-noupstream.patch @@ -0,0 +1,11 @@ +--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100 ++++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100 +@@ -1905,7 +1905,7 @@ + ;; + sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \ + sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ +- sh-*-linux* | sh[346lbe]*-*-linux* | \ ++ sh*-*-linux* | sh[346lbe]*-*-linux* | \ + sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ + sh64-*-netbsd* | sh64l*-*-netbsd*) + tmake_file="${tmake_file} sh/t-sh sh/t-elf" diff --git a/toolchain/gcc/4.2.0/200-uclibc-locale.patch b/toolchain/gcc/4.2.0/202-uclibc-locale.patch index bba729ce7..3e83d4bf8 100644 --- a/toolchain/gcc/4.2.0/200-uclibc-locale.patch +++ b/toolchain/gcc/4.2.0/202-uclibc-locale.patch @@ -1,70 +1,29 @@ -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-30 19:36:16.917899167 -0500 -@@ -1047,7 +1047,7 @@ - AC_MSG_CHECKING([for C locale to use]) - GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], - [use MODEL for target locale package], -- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) -+ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) - - # If they didn't use this option switch, or if they specified --enable - # with no specific model, we'll have to look for one. If they -@@ -1063,6 +1063,9 @@ - # Default to "generic". - if test $enable_clocale_flag = auto; then - case ${target_os} in -+ *-uclibc*) -+ enable_clocale_flag=uclibc -+ ;; - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) - AC_EGREP_CPP([_GLIBCXX_ok], [ - #include <features.h> -@@ -1206,6 +1209,41 @@ - CTIME_CC=config/locale/generic/time_members.cc - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h - ;; -+ uclibc) -+ AC_MSG_RESULT(uclibc) -+ -+ # Declare intention to use gettext, and add support for specific -+ # languages. -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT -+ ALL_LINGUAS="de fr" -+ -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. -+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then -+ USE_NLS=yes -+ fi -+ # Export the build objects. -+ for ling in $ALL_LINGUAS; do \ -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ -+ done -+ AC_SUBST(glibcxx_MOFILES) -+ AC_SUBST(glibcxx_POFILES) -+ -+ CLOCALE_H=config/locale/uclibc/c_locale.h -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc -+ CMESSAGES_H=config/locale/uclibc/messages_members.h -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc -+ CTIME_H=config/locale/uclibc/time_members.h -+ CTIME_CC=config/locale/uclibc/time_members.cc -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h -+ ;; - esac +--- gcc/libstdc++-v3/include/c_compatibility/wchar.h.uclibc200~ 2006-03-06 20:52:07 +0100 ++++ gcc/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-10 15:06:17 +0100 +@@ -101,7 +101,9 @@ + using std::wmemcpy; + using std::wmemmove; + using std::wmemset; ++#if _GLIBCXX_HAVE_WCSFTIME + using std::wcsftime; ++#endif - # 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-30 19:36:16.918898999 -0500 + #if _GLIBCXX_USE_C99 + using std::wcstold; +--- gcc/libstdc++-v3/include/c_std/std_cwchar.h.uclibc200~ 2006-03-06 20:52:14 +0100 ++++ gcc/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-10 15:06:17 +0100 +@@ -182,7 +182,9 @@ + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; ++#if _GLIBCXX_HAVE_WCSFTIME + using ::wcsftime; ++#endif + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; +--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:06:17 +0100 @@ -0,0 +1,63 @@ +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- + @@ -129,9 +88,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4 +#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-30 19:36:16.919898830 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:06:17 +0100 @@ -0,0 +1,160 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + @@ -293,9 +251,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0-patc +{ + const char* const* const locale::_S_categories = __gnu_cxx::category_names; +} // 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-30 19:36:16.920898661 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:06:17 +0100 @@ -0,0 +1,117 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + @@ -414,9 +371,8 @@ 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-30 19:36:16.921898492 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2006-03-10 15:06:17 +0100 @@ -0,0 +1,306 @@ +// std::codecvt implementation details, GNU version -*- C++ -*- + @@ -724,9 +680,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.1 + } +#endif +} -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-30 19:36:16.922898323 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:06:17 +0100 @@ -0,0 +1,80 @@ +// std::collate implementation details, GNU version -*- C++ -*- + @@ -808,9 +763,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.1 + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } +#endif +} -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-30 19:36:16.923898155 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:06:17 +0100 @@ -0,0 +1,300 @@ +// std::ctype implementation details, GNU version -*- C++ -*- + @@ -1112,9 +1066,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.0 + } +#endif // _GLIBCXX_USE_WCHAR_T +} -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-30 19:36:16.925897817 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:06:17 +0100 @@ -0,0 +1,100 @@ +// std::messages implementation details, GNU version -*- C++ -*- + @@ -1216,9 +1169,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4. + } +#endif +} -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-30 19:36:16.925897817 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:06:17 +0100 @@ -0,0 +1,118 @@ +// std::messages implementation details, GNU version -*- C++ -*- + @@ -1338,9 +1290,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.1 + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } -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-30 19:36:16.927897479 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:06:17 +0100 @@ -0,0 +1,692 @@ +// std::moneypunct implementation details, GNU version -*- C++ -*- + @@ -2034,9 +1985,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4. + } +#endif +} -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-30 19:36:38.467261324 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:06:17 +0100 @@ -0,0 +1,160 @@ +// std::numpunct implementation details, GNU version -*- C++ -*- + @@ -2198,9 +2148,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1 + { delete _M_data; } + #endif +} -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-30 19:36:16.929897142 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:06:17 +0100 @@ -0,0 +1,406 @@ +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- + @@ -2608,9 +2557,8 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0- + } +#endif +} -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-30 19:36:16.929897142 -0500 +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:06:17 +0100 @@ -0,0 +1,68 @@ +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- + @@ -2680,307 +2628,80 @@ diff -urN gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.1.0-p + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } -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-30 19:36:16.930896973 -0500 -@@ -0,0 +1,64 @@ -+// Locale support -*- C++ -*- -+ -+// 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 -+// software; you can redistribute it and/or modify it under the -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// 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. -+ -+ // Non-standard typedefs. -+ typedef const __ctype_touplow_t* __to_type; -+ -+ // NB: Offsets into ctype<char>::_M_table force a particular size -+ // on the mask type. Because of this, we don't use an enum. -+ typedef __ctype_mask_t mask; -+ static const mask upper = _ISupper; -+ static const mask lower = _ISlower; -+ static const mask alpha = _ISalpha; -+ static const mask digit = _ISdigit; -+ static const mask xdigit = _ISxdigit; -+ static const mask space = _ISspace; -+ static const mask print = _ISprint; -+ static const mask graph = _ISalpha | _ISdigit | _ISpunct; -+ static const mask cntrl = _IScntrl; -+ static const mask punct = _ISpunct; -+ static const mask alnum = _ISalpha | _ISdigit; -+ }; -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-30 19:36:16.931896804 -0500 -@@ -0,0 +1,69 @@ -+// Locale support -*- C++ -*- -+ -+// Copyright (C) 2000, 2002 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 -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.1 Locales -+// -+ -+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) -+// functions go in ctype.cc -+ -+ bool -+ ctype<char>:: -+ is(mask __m, char __c) const -+ { return _M_table[static_cast<unsigned char>(__c)] & __m; } -+ -+ const char* -+ ctype<char>:: -+ is(const char* __low, const char* __high, mask* __vec) const -+ { -+ while (__low < __high) -+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; -+ return __high; -+ } -+ -+ const char* -+ ctype<char>:: -+ scan_is(mask __m, const char* __low, const char* __high) const -+ { -+ while (__low < __high -+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) -+ ++__low; -+ return __low; -+ } -+ -+ const char* -+ ctype<char>:: -+ scan_not(mask __m, const char* __low, const char* __high) const -+ { -+ while (__low < __high -+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) -+ ++__low; -+ return __low; -+ } -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-30 19:36:16.931896804 -0500 -@@ -0,0 +1,92 @@ -+// Locale support -*- C++ -*- -+ -+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 -+// 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 -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+// -+// ISO C++ 14882: 22.1 Locales -+// -+ -+// Information as gleaned from /usr/include/ctype.h -+ -+ const ctype_base::mask* -+ ctype<char>::classic_table() throw() -+ { return __C_ctype_b; } -+ -+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del, -+ size_t __refs) -+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), -+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) -+ { -+ _M_toupper = __C_ctype_toupper; -+ _M_tolower = __C_ctype_tolower; -+ _M_table = __table ? __table : __C_ctype_b; -+ memset(_M_widen, 0, sizeof(_M_widen)); -+ memset(_M_narrow, 0, sizeof(_M_narrow)); -+ } -+ -+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) -+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), -+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) -+ { -+ _M_toupper = __C_ctype_toupper; -+ _M_tolower = __C_ctype_tolower; -+ _M_table = __table ? __table : __C_ctype_b; -+ memset(_M_widen, 0, sizeof(_M_widen)); -+ memset(_M_narrow, 0, sizeof(_M_narrow)); -+ } -+ -+ char -+ ctype<char>::do_toupper(char __c) const -+ { return _M_toupper[static_cast<unsigned char>(__c)]; } -+ -+ const char* -+ ctype<char>::do_toupper(char* __low, const char* __high) const -+ { -+ while (__low < __high) -+ { -+ *__low = _M_toupper[static_cast<unsigned char>(*__low)]; -+ ++__low; -+ } -+ return __high; -+ } -+ -+ char -+ ctype<char>::do_tolower(char __c) const -+ { return _M_tolower[static_cast<unsigned char>(__c)]; } -+ -+ const char* -+ ctype<char>::do_tolower(char* __low, const char* __high) const -+ { -+ while (__low < __high) -+ { -+ *__low = _M_tolower[static_cast<unsigned char>(*__low)]; -+ ++__low; -+ } -+ return __high; -+ } -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-30 19:36:16.932896635 -0500 -@@ -0,0 +1,44 @@ -+// Specific definitions for GNU/Linux -*- C++ -*- -+ -+// Copyright (C) 2000, 2001, 2002, 2003 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 -+// terms of the GNU General Public License as published by the -+// Free Software Foundation; either version 2, or (at your option) -+// any later version. -+ -+// This library is distributed in the hope that it will be useful, -+// but WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+// GNU General Public License for more details. -+ -+// You should have received a copy of the GNU General Public License along -+// with this library; see the file COPYING. If not, write to the Free -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -+// USA. -+ -+// As a special exception, you may use this file as part of a free software -+// library without restriction. Specifically, if other files instantiate -+// templates or use macros or inline functions from this file, or you compile -+// this file and link it with other files to produce an executable, this -+// file does not by itself cause the resulting executable to be covered by -+// the GNU General Public License. This exception does not however -+// invalidate any other reasons why the executable file might be covered by -+// the GNU General Public License. -+ -+#ifndef _GLIBCXX_OS_DEFINES -+#define _GLIBCXX_OS_DEFINES 1 -+ -+// System-specific #define, typedefs, corrections, etc, go here. This -+// file will come before all others. -+ -+// This keeps isanum, et al from being propagated as macros. -+#define __NO_CTYPE 1 +--- gcc/libstdc++-v3/acinclude.m4.uclibc200~ 2006-03-06 21:23:58 +0100 ++++ gcc/libstdc++-v3/acinclude.m4 2006-03-10 15:06:17 +0100 +@@ -1369,7 +1369,7 @@ + AC_MSG_CHECKING([for C locale to use]) + GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], + [use MODEL for target locale package], +- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) ++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) + + # If they didn't use this option switch, or if they specified --enable + # with no specific model, we'll have to look for one. If they +@@ -1385,6 +1385,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case ${target_os} in ++ *-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) + AC_EGREP_CPP([_GLIBCXX_ok], [ + #include <features.h> +@@ -1528,6 +1531,40 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ AC_MSG_RESULT(uclibc) + -+#include <features.h> ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" + -+// We must not see the optimized string functions GNU libc defines. -+#define __NO_STRING_INLINES ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ AC_SUBST(glibcxx_MOFILES) ++ AC_SUBST(glibcxx_POFILES) + -+#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-30 19:36:16.993886339 -0500 -@@ -3986,6 +3986,11 @@ - lt_cv_deplibs_check_method=pass_all - ;; ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +--- gcc/libstdc++-v3/configure.uclibc200~ 2006-03-10 14:40:13 +0100 ++++ gcc/libstdc++-v3/configure 2006-03-10 15:06:17 +0100 +@@ -5764,7 +5764,7 @@ + enableval="$enable_clocale" -+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]+$' -@@ -5744,6 +5749,9 @@ + case "$enableval" in +- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;; ++ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;; + *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} + { (exit 1); exit 1; }; } ;; +@@ -5789,6 +5789,9 @@ # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in @@ -2990,7 +2711,7 @@ diff -urN gcc-4.1.0/libstdc++-v3/configure gcc-4.1.0-patched/libstdc++-v3/config linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -5974,6 +5982,77 @@ +@@ -6019,6 +6022,76 @@ CTIME_CC=config/locale/generic/time_members.cc CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h ;; @@ -3053,7 +2774,6 @@ diff -urN gcc-4.1.0/libstdc++-v3/configure gcc-4.1.0-patched/libstdc++-v3/config + + CLOCALE_H=config/locale/uclibc/c_locale.h + CLOCALE_CC=config/locale/uclibc/c_locale.cc -+ CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc + CCOLLATE_CC=config/locale/uclibc/collate_members.cc + CCTYPE_CC=config/locale/uclibc/ctype_members.cc @@ -3068,179 +2788,3 @@ diff -urN gcc-4.1.0/libstdc++-v3/configure gcc-4.1.0-patched/libstdc++-v3/config esac # This is where the testsuite looks for locale catalogs, using the -@@ -7686,21 +7765,6 @@ - echo "${ECHO_T}$enable_long_long" >&6 - - -- # Check whether --enable-wchar_t or --disable-wchar_t was given. --if test "${enable_wchar_t+set}" = set; then -- enableval="$enable_wchar_t" -- -- case "$enableval" in -- yes|no) ;; -- *) { { echo "$as_me:$LINENO: error: Argument to enable/disable wchar_t must be yes or no" >&5 --echo "$as_me: error: Argument to enable/disable wchar_t must be yes or no" >&2;} -- { (exit 1); exit 1; }; } ;; -- esac -- --else -- enable_wchar_t=yes --fi; -- - if test x"$ac_c99_wchar" = x"yes" && test x"$enable_wchar_t" = x"yes"; then - - 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-30 19:36:16.996885833 -0500 -@@ -249,6 +249,12 @@ - ;; - esac - -+# Override for uClibc since linux-uclibc gets mishandled above. -+case "${host_os}" in -+ *-uclibc*) -+ os_include_dir="os/uclibc" -+ ;; -+esac - - # Set any OS-dependent and CPU-dependent bits. - # 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-30 19:36:16.997885664 -0500 -@@ -143,6 +143,99 @@ - ;; - esac - ;; -+ *-uclibc*) -+# Temporary hack until we implement the float versions of the libm funcs -+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ -+ machine/endian.h machine/param.h sys/machine.h sys/types.h \ -+ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) -+ SECTION_FLAGS='-ffunction-sections -fdata-sections' -+ AC_SUBST(SECTION_FLAGS) -+ GLIBCXX_CHECK_LINKER_FEATURES -+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT -+ GLIBCXX_CHECK_WCHAR_T_SUPPORT -+ -+ # For LFS. -+ AC_DEFINE(HAVE_INT64_T) -+ case "$target" in -+ *-uclinux*) -+ # Don't enable LFS with uClinux -+ ;; -+ *) -+ AC_DEFINE(_GLIBCXX_USE_LFS) -+ esac -+ -+ # For showmanyc_helper(). -+ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) -+ GLIBCXX_CHECK_POLL -+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG -+ -+ # For xsputn_2(). -+ AC_CHECK_HEADERS(sys/uio.h) -+ GLIBCXX_CHECK_WRITEV -+ -+# AC_DEFINE(HAVE_ACOSF) -+# AC_DEFINE(HAVE_ASINF) -+# AC_DEFINE(HAVE_ATANF) -+# AC_DEFINE(HAVE_ATAN2F) -+ AC_DEFINE(HAVE_CEILF) -+ AC_DEFINE(HAVE_COPYSIGN) -+# AC_DEFINE(HAVE_COPYSIGNF) -+# AC_DEFINE(HAVE_COSF) -+# AC_DEFINE(HAVE_COSHF) -+# AC_DEFINE(HAVE_EXPF) -+# AC_DEFINE(HAVE_FABSF) -+ AC_DEFINE(HAVE_FINITE) -+ AC_DEFINE(HAVE_FINITEF) -+ AC_DEFINE(HAVE_FLOORF) -+# AC_DEFINE(HAVE_FMODF) -+# AC_DEFINE(HAVE_FREXPF) -+ AC_DEFINE(HAVE_HYPOT) -+# AC_DEFINE(HAVE_HYPOTF) -+ AC_DEFINE(HAVE_ISINF) -+ AC_DEFINE(HAVE_ISINFF) -+ AC_DEFINE(HAVE_ISNAN) -+ AC_DEFINE(HAVE_ISNANF) -+# AC_DEFINE(HAVE_LOGF) -+# AC_DEFINE(HAVE_LOG10F) -+# AC_DEFINE(HAVE_MODFF) -+# AC_DEFINE(HAVE_SINF) -+# AC_DEFINE(HAVE_SINHF) -+# AC_DEFINE(HAVE_SINCOS) -+# AC_DEFINE(HAVE_SINCOSF) -+ AC_DEFINE(HAVE_SQRTF) -+# AC_DEFINE(HAVE_TANF) -+# AC_DEFINE(HAVE_TANHF) -+ if test x"long_double_math_on_this_cpu" = x"yes"; then -+ AC_MSG_ERROR([long_double_math_on_this_cpu is yes!]) -+# AC_DEFINE(HAVE_ACOSL) -+# AC_DEFINE(HAVE_ASINL) -+# AC_DEFINE(HAVE_ATANL) -+# AC_DEFINE(HAVE_ATAN2L) -+# AC_DEFINE(HAVE_CEILL) -+# AC_DEFINE(HAVE_COPYSIGNL) -+# AC_DEFINE(HAVE_COSL) -+# AC_DEFINE(HAVE_COSHL) -+# AC_DEFINE(HAVE_EXPL) -+# AC_DEFINE(HAVE_FABSL) -+# AC_DEFINE(HAVE_FINITEL) -+# AC_DEFINE(HAVE_FLOORL) -+# AC_DEFINE(HAVE_FMODL) -+# AC_DEFINE(HAVE_FREXPL) -+# AC_DEFINE(HAVE_HYPOTL) -+# AC_DEFINE(HAVE_ISINFL) -+# AC_DEFINE(HAVE_ISNANL) -+# AC_DEFINE(HAVE_LOGL) -+# AC_DEFINE(HAVE_LOG10L) -+# AC_DEFINE(HAVE_MODFL) -+# AC_DEFINE(HAVE_POWL) -+# AC_DEFINE(HAVE_SINL) -+# AC_DEFINE(HAVE_SINHL) -+# AC_DEFINE(HAVE_SINCOSL) -+# AC_DEFINE(HAVE_SQRTL) -+# AC_DEFINE(HAVE_TANL) -+# AC_DEFINE(HAVE_TANHL) -+ fi -+ ;; - *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) - AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ - machine/endian.h machine/param.h sys/machine.h sys/types.h \ -@@ -157,7 +250,7 @@ - AC_DEFINE(HAVE_INT64_T) - case "$target" in - *-uclinux*) -- # Don't enable LFS with uClibc -+ # Don't enable LFS with uClinux - ;; - *) - 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-30 19:36:16.997885664 -0500 -@@ -101,7 +101,9 @@ - using std::wmemcpy; - using std::wmemmove; - using std::wmemset; -+#if _GLIBCXX_HAVE_WCSFTIME - using std::wcsftime; -+#endif - - #if _GLIBCXX_USE_C99 - 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-30 19:36:16.998885495 -0500 -@@ -179,7 +179,9 @@ - using ::wcscoll; - using ::wcscpy; - using ::wcscspn; -+#if _GLIBCXX_HAVE_WCSFTIME - using ::wcsftime; -+#endif - using ::wcslen; - using ::wcsncat; - using ::wcsncmp; diff --git a/toolchain/gcc/4.2.0/203-uclibc-locale-no__x.patch b/toolchain/gcc/4.2.0/203-uclibc-locale-no__x.patch new file mode 100644 index 000000000..6ba47003b --- /dev/null +++ b/toolchain/gcc/4.2.0/203-uclibc-locale-no__x.patch @@ -0,0 +1,213 @@ +--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100 +@@ -60,4 +60,49 @@ + extern "C" __typeof(wctype_l) __wctype_l; + #endif + ++# define __nl_langinfo_l nl_langinfo_l ++# define __strcoll_l strcoll_l ++# define __strftime_l strftime_l ++# define __strtod_l strtod_l ++# define __strtof_l strtof_l ++# define __strtold_l strtold_l ++# define __strxfrm_l strxfrm_l ++# define __newlocale newlocale ++# define __freelocale freelocale ++# define __duplocale duplocale ++# define __uselocale uselocale ++ ++# ifdef _GLIBCXX_USE_WCHAR_T ++# define __iswctype_l iswctype_l ++# define __towlower_l towlower_l ++# define __towupper_l towupper_l ++# define __wcscoll_l wcscoll_l ++# define __wcsftime_l wcsftime_l ++# define __wcsxfrm_l wcsxfrm_l ++# define __wctype_l wctype_l ++# endif ++ ++#else ++# define __nl_langinfo_l(N, L) nl_langinfo((N)) ++# define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) ++# define __strtod_l(S, E, L) strtod((S), (E)) ++# define __strtof_l(S, E, L) strtof((S), (E)) ++# define __strtold_l(S, E, L) strtold((S), (E)) ++# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) ++# warning should dummy __newlocale check for C|POSIX ? ++# define __newlocale(a, b, c) NULL ++# define __freelocale(a) ((void)0) ++# define __duplocale(a) __c_locale() ++//# define __uselocale ? ++// ++# ifdef _GLIBCXX_USE_WCHAR_T ++# define __iswctype_l(C, M, L) iswctype((C), (M)) ++# define __towlower_l(C, L) towlower((C)) ++# define __towupper_l(C, L) towupper((C)) ++# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) ++//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T)) ++# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) ++# define __wctype_l(S, L) wctype((S)) ++# endif ++ + #endif // GLIBC 2.3 and later +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100 +@@ -39,20 +39,6 @@ + #include <langinfo.h> + #include <bits/c++locale_internal.h> + +-#ifndef __UCLIBC_HAS_XLOCALE__ +-#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) +-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) +-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) +-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) +-#define __strtof_l(S, E, L) strtof((S), (E)) +-#define __strtod_l(S, E, L) strtod((S), (E)) +-#define __strtold_l(S, E, L) strtold((S), (E)) +-#warning should dummy __newlocale check for C|POSIX ? +-#define __newlocale(a, b, c) NULL +-#define __freelocale(a) ((void)0) +-#define __duplocale(a) __c_locale() +-#endif +- + namespace std + { + template<> +--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100 +@@ -36,13 +36,6 @@ + #include <locale> + #include <bits/c++locale_internal.h> + +-#ifndef __UCLIBC_HAS_XLOCALE__ +-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) +-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) +-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) +-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) +-#endif +- + namespace std + { + // These are basically extensions to char_traits, and perhaps should +--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100 +@@ -43,10 +43,6 @@ + #warning tailor for stub locale support + #endif + +-#ifndef __UCLIBC_HAS_XLOCALE__ +-#define __nl_langinfo_l(N, L) nl_langinfo((N)) +-#endif +- + namespace std + { + // Construct and return valid pattern consisting of some combination of: +--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100 +@@ -41,9 +41,6 @@ + #ifdef __UCLIBC_MJN3_ONLY__ + #warning tailor for stub locale support + #endif +-#ifndef __UCLIBC_HAS_XLOCALE__ +-#define __nl_langinfo_l(N, L) nl_langinfo((N)) +-#endif + + namespace std + { +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100 +@@ -40,9 +40,6 @@ + #ifdef __UCLIBC_MJN3_ONLY__ + #warning tailor for stub locale support + #endif +-#ifndef __UCLIBC_HAS_XLOCALE__ +-#define __nl_langinfo_l(N, L) nl_langinfo((N)) +-#endif + + namespace std + { +--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100 +@@ -38,13 +38,6 @@ + #undef _LIBC + #include <bits/c++locale_internal.h> + +-#ifndef __UCLIBC_HAS_XLOCALE__ +-#define __wctype_l(S, L) wctype((S)) +-#define __towupper_l(C, L) towupper((C)) +-#define __towlower_l(C, L) towlower((C)) +-#define __iswctype_l(C, M, L) iswctype((C), (M)) +-#endif +- + namespace std + { + // NB: The other ctype<char> specializations are in src/locale.cc and +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100 +@@ -39,13 +39,10 @@ + #ifdef __UCLIBC_MJN3_ONLY__ + #warning fix gettext stuff + #endif +-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ +-extern "C" char *__dcgettext(const char *domainname, +- const char *msgid, int category); + #undef gettext +-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES) + #else +-#undef gettext + #define gettext(msgid) (msgid) + #endif + +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100 +@@ -36,15 +36,11 @@ + #ifdef __UCLIBC_MJN3_ONLY__ + #warning fix prototypes for *textdomain funcs + #endif +-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ +-extern "C" char *__textdomain(const char *domainname); +-extern "C" char *__bindtextdomain(const char *domainname, +- const char *dirname); +-#else +-#undef __textdomain +-#undef __bindtextdomain +-#define __textdomain(D) ((void)0) +-#define __bindtextdomain(D,P) ((void)0) ++#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++#undef textdomain ++#undef bindtextdomain ++#define textdomain(D) ((void)0) ++#define bindtextdomain(D,P) ((void)0) + #endif + + // Non-virtual member functions. +@@ -70,7 +66,7 @@ + messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, + const char* __dir) const + { +- __bindtextdomain(__s.c_str(), __dir); ++ bindtextdomain(__s.c_str(), __dir); + return this->do_open(__s, __loc); + } + +@@ -90,7 +86,7 @@ + { + // No error checking is done, assume the catalog exists and can + // be used. +- __textdomain(__s.c_str()); ++ textdomain(__s.c_str()); + return 0; + } + +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100 +@@ -68,6 +68,7 @@ + { + extern "C" __typeof(uselocale) __uselocale; + } ++#define __uselocale uselocale + #endif + + namespace std diff --git a/toolchain/gcc/4.2.0/204-uclibc-locale-wchar_fix.patch b/toolchain/gcc/4.2.0/204-uclibc-locale-wchar_fix.patch new file mode 100644 index 000000000..160ab35bb --- /dev/null +++ b/toolchain/gcc/4.2.0/204-uclibc-locale-wchar_fix.patch @@ -0,0 +1,48 @@ +--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100 +@@ -401,7 +401,7 @@ + # ifdef __UCLIBC_HAS_XLOCALE__ + _M_data->_M_decimal_point = __cloc->decimal_point_wc; + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; +-# else ++# elif defined __UCLIBC_HAS_LOCALE__ + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; + # endif +@@ -556,7 +556,7 @@ + # ifdef __UCLIBC_HAS_XLOCALE__ + _M_data->_M_decimal_point = __cloc->decimal_point_wc; + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; +-# else ++# elif defined __UCLIBC_HAS_LOCALE__ + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; + # endif +--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100 +@@ -127,12 +127,25 @@ + { + // Named locale. + // NB: In the GNU model wchar_t is always 32 bit wide. ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be numeric ++#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; ++# elif defined __UCLIBC_HAS_LOCALE__ ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else + union { char *__s; wchar_t __w; } __u; + __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); + _M_data->_M_decimal_point = __u.__w; + + __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); + _M_data->_M_thousands_sep = __u.__w; ++#endif + + if (_M_data->_M_thousands_sep == L'\0') + _M_data->_M_grouping = ""; diff --git a/toolchain/gcc/4.2.0/205-uclibc-locale-update.patch b/toolchain/gcc/4.2.0/205-uclibc-locale-update.patch new file mode 100644 index 000000000..be43c6e23 --- /dev/null +++ b/toolchain/gcc/4.2.0/205-uclibc-locale-update.patch @@ -0,0 +1,424 @@ +--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200_update~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100 +@@ -1,6 +1,7 @@ + // Wrapper for underlying C-language localization -*- C++ -*- + +-// Copyright (C) 2001, 2002, 2003 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 +@@ -15,7 +16,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +@@ -46,16 +47,13 @@ + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, + const __c_locale& __cloc) + { +- if (!(__err & ios_base::failbit)) +- { +- char* __sanity; +- errno = 0; +- float __f = __strtof_l(__s, &__sanity, __cloc); +- if (__sanity != __s && errno != ERANGE) +- __v = __f; +- else +- __err |= ios_base::failbit; +- } ++ char* __sanity; ++ errno = 0; ++ float __f = __strtof_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __f; ++ else ++ __err |= ios_base::failbit; + } + + template<> +@@ -63,16 +61,13 @@ + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, + const __c_locale& __cloc) + { +- if (!(__err & ios_base::failbit)) +- { +- char* __sanity; +- errno = 0; +- double __d = __strtod_l(__s, &__sanity, __cloc); +- if (__sanity != __s && errno != ERANGE) +- __v = __d; +- else +- __err |= ios_base::failbit; +- } ++ char* __sanity; ++ errno = 0; ++ double __d = __strtod_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __d; ++ else ++ __err |= ios_base::failbit; + } + + template<> +@@ -80,16 +75,13 @@ + __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, + const __c_locale& __cloc) + { +- if (!(__err & ios_base::failbit)) +- { +- char* __sanity; +- errno = 0; +- long double __ld = __strtold_l(__s, &__sanity, __cloc); +- if (__sanity != __s && errno != ERANGE) +- __v = __ld; +- else +- __err |= ios_base::failbit; +- } ++ char* __sanity; ++ errno = 0; ++ long double __ld = __strtold_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __ld; ++ else ++ __err |= ios_base::failbit; + } + + void +@@ -110,7 +102,7 @@ + void + locale::facet::_S_destroy_c_locale(__c_locale& __cloc) + { +- if (_S_get_c_locale() != __cloc) ++ if (__cloc && _S_get_c_locale() != __cloc) + __freelocale(__cloc); + } + +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200_update~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +@@ -45,15 +45,16 @@ + #ifdef __UCLIBC_MJN3_ONLY__ + #warning fix this + #endif +-#ifdef __UCLIBC_HAS_LOCALE__ ++#ifdef _GLIBCXX_USE_ICONV + #include <iconv.h> // For codecvt using iconv, iconv_t + #endif +-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++#ifdef HAVE_LIBINTL_H + #include <libintl.h> // For messages + #endif + + #ifdef __UCLIBC_MJN3_ONLY__ + #warning what is _GLIBCXX_C_LOCALE_GNU for ++// psm: used in os/gnu-linux/ctype_noninline.h + #endif + #define _GLIBCXX_C_LOCALE_GNU 1 + +--- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc.uclibc200_update~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +@@ -33,9 +33,14 @@ + + // Written by Benjamin Kosnik <bkoz@redhat.com> + ++#include <features.h> ++#ifdef __UCLIBC_HAS_LOCALE__ + #define _LIBC + #include <locale> + #undef _LIBC ++#else ++#include <locale> ++#endif + #include <bits/c++locale_internal.h> + + namespace std +@@ -138,20 +143,34 @@ + ctype<wchar_t>:: + do_is(mask __m, wchar_t __c) const + { +- // Highest bitmask in ctype_base == 10, but extra in "C" +- // library for blank. ++ // The case of __m == ctype_base::space is particularly important, ++ // due to its use in many istream functions. Therefore we deal with ++ // it first, exploiting the knowledge that on GNU systems _M_bit[5] ++ // is the mask corresponding to ctype_base::space. NB: an encoding ++ // change would not affect correctness! + bool __ret = false; +- const size_t __bitmasksize = 11; +- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) +- if (__m & _M_bit[__bitcur] +- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) +- { +- __ret = true; +- break; +- } ++ if (__m == _M_bit[5]) ++ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); ++ else ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ const size_t __bitmasksize = 11; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__m & _M_bit[__bitcur]) ++ { ++ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ { ++ __ret = true; ++ break; ++ } ++ else if (__m == _M_bit[__bitcur]) ++ break; ++ } ++ } + return __ret; + } +- ++ + const wchar_t* + ctype<wchar_t>:: + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100 +@@ -1,6 +1,6 @@ + // std::messages implementation details, GNU version -*- 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 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +@@ -47,18 +47,21 @@ + template<typename _CharT> + messages<_CharT>::messages(size_t __refs) + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), +- _M_name_messages(_S_get_c_name()) ++ _M_name_messages(_S_get_c_name()) + { } + + template<typename _CharT> + messages<_CharT>::messages(__c_locale __cloc, const char* __s, + size_t __refs) +- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), +- _M_name_messages(__s) ++ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL) + { +- char* __tmp = new char[std::strlen(__s) + 1]; +- std::strcpy(__tmp, __s); ++ const size_t __len = std::strlen(__s) + 1; ++ char* __tmp = new char[__len]; ++ std::memcpy(__tmp, __s, __len); + _M_name_messages = __tmp; ++ ++ // Last to avoid leaking memory if new throws. ++ _M_c_locale_messages = _S_clone_c_locale(__cloc); + } + + template<typename _CharT> +--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +@@ -33,9 +33,14 @@ + + // Written by Benjamin Kosnik <bkoz@redhat.com> + ++#include <features.h> ++#ifdef __UCLIBC_HAS_LOCALE__ + #define _LIBC + #include <locale> + #undef _LIBC ++#else ++#include <locale> ++#endif + #include <bits/c++locale_internal.h> + + #ifdef __UCLIBC_MJN3_ONLY__ +@@ -206,7 +211,7 @@ + } + break; + default: +- ; ++ __ret = pattern(); + } + return __ret; + } +--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +@@ -33,9 +33,14 @@ + + // Written by Benjamin Kosnik <bkoz@redhat.com> + ++#include <features.h> ++#ifdef __UCLIBC_HAS_LOCALE__ + #define _LIBC + #include <locale> + #undef _LIBC ++#else ++#include <locale> ++#endif + #include <bits/c++locale_internal.h> + + #ifdef __UCLIBC_MJN3_ONLY__ +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:39:14 +0100 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100 ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100 +@@ -1,6 +1,6 @@ + // std::time_get, std::time_put implementation, GNU version -*- 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 +@@ -15,7 +15,7 @@ + + // You should have received a copy of the GNU General Public License along + // with this library; see the file COPYING. If not, write to the Free +-// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + // USA. + + // As a special exception, you may use this file as part of a free software +@@ -37,25 +37,33 @@ + template<typename _CharT> + __timepunct<_CharT>::__timepunct(size_t __refs) + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), +- _M_name_timepunct(_S_get_c_name()) ++ _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + + template<typename _CharT> + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), +- _M_name_timepunct(_S_get_c_name()) ++ _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + + template<typename _CharT> + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), +- _M_name_timepunct(__s) ++ _M_name_timepunct(NULL) + { +- char* __tmp = new char[std::strlen(__s) + 1]; +- std::strcpy(__tmp, __s); ++ const size_t __len = std::strlen(__s) + 1; ++ char* __tmp = new char[__len]; ++ std::memcpy(__tmp, __s, __len); + _M_name_timepunct = __tmp; +- _M_initialize_timepunct(__cloc); ++ ++ try ++ { _M_initialize_timepunct(__cloc); } ++ catch(...) ++ { ++ delete [] _M_name_timepunct; ++ __throw_exception_again; ++ } + } + + template<typename _CharT> |