From 944cb6159943e2fcdde4fa7b54d7ecd444f9bc56 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 2 Oct 2009 09:48:50 -0400 Subject: [PATCH] uclibc: replaced patches for gcc with those from buildroot for 4.2.4 http://git.busybox.net/buildroot/tree/toolchain/gcc/4.2.4 --- .../pkg_patch/gcc/100-uclibc-conf.patch | 652 ++++------------ .../gcc/103-uclibc-conf-noupstream.patch | 27 + .../pkg_patch/gcc/200-uclibc-locale.patch | 726 +++--------------- .../gcc/203-uclibc-locale-no__x.patch | 229 ++++++ .../gcc/204-uclibc-locale-wchar_fix.patch | 64 ++ .../gcc/205-uclibc-locale-update.patch | 363 +++++++++ .../pkg_patch/gcc/300-libstdc++-pic.patch | 47 +- .../gcc/301-missing-execinfo_h.patch | 6 +- .../pkg_patch/gcc/302-c99-snprintf.patch | 6 +- .../gcc/303-c99-complex-ugly-hack.patch | 6 +- .../gcc/305-libmudflap-susv3-legacy.patch | 65 ++ .../gcc/306-libstdc++-namespace.patch | 52 ++ .../pkg_patch/gcc/307-locale_facets.patch | 42 + .../gcc/402-libbackend_dep_gcov-iov.h.patch | 29 + .../gcc/602-sdk-libstdc++-includes.patch | 38 - .../pkg_patch/gcc/800-arm-bigendian.patch | 83 ++ .../pkg_patch/gcc/900-crt-align-1.patch | 58 -- .../gcc/904-flatten-switch-stmt-00.patch | 169 ++++ .../uclibc/pkg_patch/gcc/910-soft-float.patch | 42 + .../uclibc/pkg_patch/gcc/920-soft-float.patch | 37 + base/uclibc/pkg_patch/gcc/index.patch | 38 - 21 files changed, 1517 insertions(+), 1262 deletions(-) create mode 100644 base/uclibc/pkg_patch/gcc/103-uclibc-conf-noupstream.patch create mode 100644 base/uclibc/pkg_patch/gcc/203-uclibc-locale-no__x.patch create mode 100644 base/uclibc/pkg_patch/gcc/204-uclibc-locale-wchar_fix.patch create mode 100644 base/uclibc/pkg_patch/gcc/205-uclibc-locale-update.patch create mode 100644 base/uclibc/pkg_patch/gcc/305-libmudflap-susv3-legacy.patch create mode 100644 base/uclibc/pkg_patch/gcc/306-libstdc++-namespace.patch create mode 100644 base/uclibc/pkg_patch/gcc/307-locale_facets.patch create mode 100644 base/uclibc/pkg_patch/gcc/402-libbackend_dep_gcov-iov.h.patch delete mode 100644 base/uclibc/pkg_patch/gcc/602-sdk-libstdc++-includes.patch create mode 100644 base/uclibc/pkg_patch/gcc/800-arm-bigendian.patch delete mode 100644 base/uclibc/pkg_patch/gcc/900-crt-align-1.patch create mode 100644 base/uclibc/pkg_patch/gcc/904-flatten-switch-stmt-00.patch create mode 100644 base/uclibc/pkg_patch/gcc/910-soft-float.patch create mode 100644 base/uclibc/pkg_patch/gcc/920-soft-float.patch delete mode 100644 base/uclibc/pkg_patch/gcc/index.patch diff --git a/base/uclibc/pkg_patch/gcc/100-uclibc-conf.patch b/base/uclibc/pkg_patch/gcc/100-uclibc-conf.patch index 6c8aadded..9ec0eaac5 100644 --- a/base/uclibc/pkg_patch/gcc/100-uclibc-conf.patch +++ b/base/uclibc/pkg_patch/gcc/100-uclibc-conf.patch @@ -1,9 +1,8 @@ # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # -# Filename: package/.../uclibc/pkg_patch/gcc-100-uclibc-conf.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project +# Filename: package/.../uclibc/pkg_patch/gcc/100-uclibc-conf.patch +# Copyright (C) 2009 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -14,547 +13,204 @@ # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- ---- gcc-4.1.0/gcc/config/t-linux-uclibc -+++ gcc-4.1.0/gcc/config/t-linux-uclibc -@@ -0,0 +1,5 @@ -+# Remove glibc specific files added in t-linux -+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES)) -+ -+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc -+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH)) ---- gcc-4.1.0/gcc/config.gcc -+++ gcc-4.1.0/gcc/config.gcc -@@ -1887,7 +1887,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" -@@ -2341,6 +2341,12 @@ m32c-*-elf*) - ;; - esac + +--- gcc/libgomp/configure ++++ gcc/libgomp/configure +@@ -3771,7 +3771,7 @@ + ;; -+# Rather than hook into each target, just do it after all the linux -+# targets have been processed -+case ${target} in -+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc" -+esac -+ - case ${target} in - i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1) - tmake_file="${tmake_file} i386/t-gmm_malloc" ---- gcc-4.1.0/boehm-gc/configure -+++ gcc-4.1.0/boehm-gc/configure -@@ -4320,6 +4320,11 @@ linux-gnu*) + # This must be Linux ELF. +-linux-gnu*) ++linux*) 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]+$' ---- gcc-4.1.0/configure -+++ gcc-4.1.0/configure -@@ -1133,7 +1133,7 @@ no) - ;; - "") - 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*) ---- gcc-4.1.0/configure.in -+++ gcc-4.1.0/configure.in -@@ -341,7 +341,7 @@ no) - ;; - "") - 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*) ---- gcc-4.1.0/contrib/regression/objs-gcc.sh -+++ gcc-4.1.0/contrib/regression/objs-gcc.sh -@@ -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 ---- gcc-4.1.0/gcc/config/alpha/linux-elf.h -+++ gcc-4.1.0/gcc/config/alpha/linux-elf.h -@@ -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" +--- gcc/gcc/config/cris/linux.h ++++ gcc/gcc/config/cris/linux.h +@@ -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 ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" +#endif - #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ - %{O*:-O3} %{!O*:-O1} \ ---- gcc-4.1.0/gcc/config/arm/linux-elf.h -+++ gcc-4.1.0/gcc/config/arm/linux-elf.h -@@ -51,7 +51,11 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" +--- gcc/libstdc++-v3/configure ++++ gcc/libstdc++-v3/configure +@@ -4276,7 +4276,7 @@ + ;; -+#ifdef USE_UCLIBC -+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" -+#else - #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2" -+#endif + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; - #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \ - %{b} \ ---- gcc-4.1.0/gcc/config/cris/linux.h -+++ gcc-4.1.0/gcc/config/cris/linux.h -@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */ - #undef CRIS_DEFAULT_CPU_VERSION - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG +--- gcc/zlib/configure ++++ gcc/zlib/configure +@@ -3422,7 +3422,7 @@ + ;; -+#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" + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; -@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */ - %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ - %{!r:%{O2|O3: --gc-sections}}" +--- gcc/libobjc/configure ++++ gcc/libobjc/configure +@@ -3309,7 +3309,7 @@ + ;; -+#endif /* USE_UCLIBC */ -+ + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; - /* Node: Run-time Target */ +--- gcc/libgfortran/configure ++++ gcc/libgfortran/configure +@@ -3695,7 +3695,7 @@ + ;; ---- gcc-4.1.0/gcc/config/i386/linux.h -+++ gcc-4.1.0/gcc/config/i386/linux.h -@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */ - #define LINK_EMULATION "elf_i386" - #define DYNAMIC_LINKER "/lib/ld-linux.so.2" + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; -+#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 },\ ---- gcc-4.1.0/gcc/config/i386/linux64.h -+++ gcc-4.1.0/gcc/config/i386/linux64.h -@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */ - When the -shared link option is used a final link is not being - done. */ - -+#ifdef USE_UCLIBC -+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" -+#else -+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2" -+#endif - #undef LINK_SPEC - #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ -- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \ -+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \ -+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \ - %{static:-static}}" - - /* Similar to standard Linux, but adding -ffast-math support. */ ---- gcc-4.1.0/gcc/config/ia64/linux.h -+++ gcc-4.1.0/gcc/config/ia64/linux.h -@@ -37,13 +37,18 @@ do { \ - /* Define this for shared library support because it isn't in the main - linux.h file. */ - -+#ifdef USE_UCLIBC -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#else -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" -+#endif - #undef LINK_SPEC - #define LINK_SPEC "\ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \ -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ - %{static:-static}}" +--- gcc/libmudflap/configure ++++ gcc/libmudflap/configure +@@ -5378,7 +5378,7 @@ + ;; + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; ---- gcc-4.1.0/gcc/config/m68k/linux.h -+++ gcc-4.1.0/gcc/config/m68k/linux.h -@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */ +--- gcc/boehm-gc/configure ++++ gcc/boehm-gc/configure +@@ -4316,7 +4316,7 @@ + ;; - /* If ELF is the default format, we should not use /lib/elf. */ + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; -+#ifdef USE_UCLIBC -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#else -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" -+#endif - #undef LINK_SPEC - #define LINK_SPEC "-m m68kelf %{shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \ -+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ - %{static}}" - - /* For compatibility with linux/a.out */ ---- gcc-4.1.0/gcc/config/mips/linux.h -+++ gcc-4.1.0/gcc/config/mips/linux.h -@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */ - - /* Borrowed from sparc/linux.h */ - #undef LINK_SPEC -+#ifdef USE_UCLIBC -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#else -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" -+#endif - #define LINK_SPEC \ - "%(endian_spec) \ - %{shared:-shared} \ -@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ - %{static:-static}}}" - - #undef SUBTARGET_ASM_SPEC ---- gcc-4.1.0/gcc/config/pa/pa-linux.h -+++ gcc-4.1.0/gcc/config/pa/pa-linux.h -@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */ - /* Define this for shared library support because it isn't in the main - linux.h file. */ - -+#ifdef USE_UCLIBC -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#else -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" -+#endif - #undef LINK_SPEC - #define LINK_SPEC "\ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ - %{static:-static}}" - - /* glibc's profiling functions don't need gcc to allocate counters. */ ---- gcc-4.1.0/gcc/config/rs6000/linux.h -+++ gcc-4.1.0/gcc/config/rs6000/linux.h -@@ -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 +--- gcc/libffi/configure ++++ gcc/libffi/configure +@@ -3453,7 +3453,7 @@ + ;; - #define LINK_GCC_C_SEQUENCE_SPEC \ - "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" ---- gcc-4.1.0/gcc/config/rs6000/sysv4.h -+++ gcc-4.1.0/gcc/config/rs6000/sysv4.h -@@ -866,6 +866,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) }" - -@@ -1043,6 +1044,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 -@@ -1209,6 +1214,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 }, \ ---- gcc-4.1.0/gcc/config/s390/linux.h -+++ gcc-4.1.0/gcc/config/s390/linux.h -@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street, - #define MULTILIB_DEFAULTS { "m31" } - #endif - -+#ifdef USE_UCLIBC -+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" -+#else -+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1" -+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1" -+#endif - #undef LINK_SPEC - #define LINK_SPEC \ - "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ -@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street, - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{!dynamic-linker: \ -- %{m31:-dynamic-linker /lib/ld.so.1} \ -- %{m64:-dynamic-linker /lib/ld64.so.1}}}}" -+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \ -+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}" - - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack ---- gcc-4.1.0/gcc/config/sh/linux.h -+++ gcc-4.1.0/gcc/config/sh/linux.h -@@ -56,12 +56,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 + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; - /* Output assembler code to STREAM to call the profiler. */ +--- gcc/libssp/configure ++++ gcc/libssp/configure +@@ -4409,7 +4409,7 @@ + ;; ---- gcc-4.1.0/gcc/config/sparc/linux.h -+++ gcc-4.1.0/gcc/config/sparc/linux.h -@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */ + # This must be Linux ELF. +-linux-gnu*) ++linux*) + lt_cv_deplibs_check_method=pass_all + ;; - /* If ELF is the default format, we should not use /lib/elf. */ +--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -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 ++++ gcc/libjava/classpath/ltconfig +@@ -603,7 +603,7 @@ -+#ifdef USE_UCLIBC -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#else -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#endif - #undef LINK_SPEC - #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ - %{!mno-relax:%{!r:-relax}} \ -@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ - %{static:-static}}}" - - /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). ---- gcc-4.1.0/gcc/config/sparc/linux64.h -+++ gcc-4.1.0/gcc/config/sparc/linux64.h -@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */ - { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ - { "link_arch", LINK_ARCH_SPEC }, - -+#ifdef USE_UCLIBC -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#else -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#endif - #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ - %{!shared: \ - %{!ibcs: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ - %{static:-static}}} \ - " - ---- gcc-4.1.0/libffi/configure -+++ gcc-4.1.0/libffi/configure -@@ -3457,6 +3457,11 @@ linux-gnu*) - lt_cv_deplibs_check_method=pass_all + # 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 @@ ;; -+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]+$' ---- gcc-4.1.0/libgfortran/configure -+++ gcc-4.1.0/libgfortran/configure -@@ -3699,6 +3699,11 @@ linux-gnu*) - lt_cv_deplibs_check_method=pass_all + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no +--- gcc/libjava/classpath/configure ++++ gcc/libjava/classpath/configure +@@ -4665,7 +4665,7 @@ ;; -+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]+$' ---- gcc-4.1.0/libjava/configure -+++ gcc-4.1.0/libjava/configure -@@ -5137,6 +5137,11 @@ linux-gnu*) + # This must be Linux ELF. +-linux-gnu*) ++linux*) 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]+$' ---- gcc-4.1.0/libmudflap/configure -+++ gcc-4.1.0/libmudflap/configure -@@ -5382,6 +5382,11 @@ linux-gnu*) - lt_cv_deplibs_check_method=pass_all +--- gcc/libjava/configure ++++ gcc/libjava/configure +@@ -5212,7 +5212,7 @@ ;; -+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]+$' ---- gcc-4.1.0/libobjc/configure -+++ gcc-4.1.0/libobjc/configure -@@ -3312,6 +3312,11 @@ linux-gnu*) + # This must be Linux ELF. +-linux-gnu*) ++linux*) 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]+$' ---- gcc-4.1.0/libtool.m4 -+++ gcc-4.1.0/libtool.m4 -@@ -743,6 +743,11 @@ linux-gnu*) +--- gcc/libtool.m4 ++++ gcc/libtool.m4 +@@ -739,7 +739,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) 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]+$'] ---- gcc-4.1.0/ltconfig -+++ gcc-4.1.0/ltconfig -@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- +--- gcc/ltconfig ++++ gcc/ltconfig +@@ -603,7 +603,7 @@ # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in -+linux-uclibc*) ;; - linux-gnu*) ;; +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac -@@ -1274,6 +1275,23 @@ linux-gnu*) - dynamic_linker='GNU/Linux ld.so' + +@@ -1251,7 +1251,7 @@ ;; -+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*) + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux need_lib_prefix=no need_version=no ---- gcc-4.1.0/zlib/configure -+++ gcc-4.1.0/zlib/configure -@@ -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/base/uclibc/pkg_patch/gcc/103-uclibc-conf-noupstream.patch b/base/uclibc/pkg_patch/gcc/103-uclibc-conf-noupstream.patch new file mode 100644 index 000000000..4140beaaa --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/103-uclibc-conf-noupstream.patch @@ -0,0 +1,27 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/103-uclibc-conf-noupstream.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- 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/base/uclibc/pkg_patch/gcc/200-uclibc-locale.patch b/base/uclibc/pkg_patch/gcc/200-uclibc-locale.patch index 29a41d2e0..861cdf416 100644 --- a/base/uclibc/pkg_patch/gcc/200-uclibc-locale.patch +++ b/base/uclibc/pkg_patch/gcc/200-uclibc-locale.patch @@ -1,9 +1,8 @@ # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # -# Filename: package/.../uclibc/pkg_patch/gcc-200-uclibc-locale.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2006 The T2 SDE Project +# Filename: package/.../uclibc/pkg_patch/gcc/200-uclibc-locale.patch +# Copyright (C) 2009 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -15,19 +14,18 @@ # version. # --- SDE-COPYRIGHT-NOTE-END --- -diff -urN gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 gcc-4.1.0/libstdc++-v3/acinclude.m4 ---- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/acinclude.m4 2006-03-25 22:06:30.000000000 -0700 -@@ -1071,7 +1071,7 @@ - AC_MSG_CHECKING([for C locale to use]) +--- gcc/libstdc++-v3/acinclude.m4 ++++ gcc/libstdc++-v3/acinclude.m4 +@@ -1369,7 +1369,7 @@ + AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ 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 -@@ -1087,6 +1087,9 @@ + + # Deal with gettext issues. Default to not using it (=no) until we detect + # support for it later. Let the user turn it off via --e/d, but let that +@@ -1385,6 +1385,9 @@ # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in @@ -37,7 +35,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 gcc-4.1.0/libstdc++-v3/acincl linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) AC_EGREP_CPP([_GLIBCXX_ok], [ #include -@@ -1230,6 +1233,40 @@ +@@ -1528,6 +1531,40 @@ CTIME_CC=config/locale/generic/time_members.cc CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h ;; @@ -78,9 +76,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 gcc-4.1.0/libstdc++-v3/acincl esac # This is where the testsuite looks for locale catalogs, using the -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-25 22:18:37.000000000 -0700 +--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h ++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h @@ -0,0 +1,63 @@ +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- + @@ -99,7 +96,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -145,14 +142,12 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +#endif + +#endif // GLIBC 2.3 and later -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-25 22:18:37.000000000 -0700 -@@ -0,0 +1,152 @@ +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc +@@ -0,0 +1,160 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 -+// Free Software Foundation, Inc. ++// Copyright (C) 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 @@ -167,7 +162,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0 + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -212,13 +207,16 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0 + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, + const __c_locale& __cloc) + { -+ char* __sanity; -+ errno = 0; -+ float __f = __strtof_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __f; -+ else -+ __err |= ios_base::failbit; ++ 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; ++ } + } + + template<> @@ -226,13 +224,16 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0 + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, + const __c_locale& __cloc) + { -+ char* __sanity; -+ errno = 0; -+ double __d = __strtod_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __d; -+ else -+ __err |= ios_base::failbit; ++ 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; ++ } + } + + template<> @@ -240,13 +241,16 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0 + __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, + const __c_locale& __cloc) + { -+ char* __sanity; -+ errno = 0; -+ long double __ld = __strtold_l(__s, &__sanity, __cloc); -+ if (__sanity != __s && errno != ERANGE) -+ __v = __ld; -+ else -+ __err |= ios_base::failbit; ++ 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; ++ } + } + + void @@ -267,7 +271,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0 + void + locale::facet::_S_destroy_c_locale(__c_locale& __cloc) + { -+ if (__cloc && _S_get_c_locale() != __cloc) ++ if (_S_get_c_locale() != __cloc) + __freelocale(__cloc); + } + @@ -301,9 +305,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0 +{ + const char* const* const locale::_S_categories = __gnu_cxx::category_names; +} // namespace std -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-26 13:03:42.000000000 -0700 +--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h ++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h @@ -0,0 +1,117 @@ +// Wrapper for underlying C-language localization -*- C++ -*- + @@ -322,7 +325,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/ + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -394,7 +397,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/ + __convert_from_v(char* __out, + const int __size __attribute__ ((__unused__)), + const char* __fmt, -+#ifdef __UCLIBC_HAS_XLOCALE__ ++#ifdef __UCLIBC_HAS_XCLOCALE__ + _Tv __v, const __c_locale& __cloc, int __prec) + { + __c_locale __old = __gnu_cxx::__uselocale(__cloc); @@ -411,7 +414,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/ + + 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); @@ -422,9 +425,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/ +} + +#endif -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc @@ -0,0 +1,306 @@ +// std::codecvt implementation details, GNU version -*- C++ -*- + @@ -443,7 +445,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gc + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -732,9 +734,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gc + } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc @@ -0,0 +1,80 @@ +// std::collate implementation details, GNU version -*- C++ -*- + @@ -753,7 +754,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gc + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -816,10 +817,9 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gc + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-25 22:18:37.000000000 -0700 -@@ -0,0 +1,314 @@ +--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc +@@ -0,0 +1,300 @@ +// std::ctype implementation details, GNU version -*- C++ -*- + +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. @@ -837,7 +837,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc- + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -967,34 +967,20 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc- + ctype:: + do_is(mask __m, wchar_t __c) const + { -+ // 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! ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. + bool __ret = false; -+ 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; -+ } -+ } ++ 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; ++ } + return __ret; + } -+ ++ + const wchar_t* + ctype:: + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const @@ -1134,9 +1120,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc- + } +#endif // _GLIBCXX_USE_WCHAR_T +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc @@ -0,0 +1,100 @@ +// std::messages implementation details, GNU version -*- C++ -*- + @@ -1155,7 +1140,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc g + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -1238,13 +1223,12 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc g + } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-25 22:18:37.000000000 -0700 -@@ -0,0 +1,121 @@ +--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h ++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h +@@ -0,0 +1,118 @@ +// std::messages implementation details, GNU version -*- C++ -*- + -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++// Copyright (C) 2001, 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 @@ -1259,7 +1243,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gc + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -1295,21 +1279,18 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gc + template + 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 + messages<_CharT>::messages(__c_locale __cloc, const char* __s, + size_t __refs) -+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL) ++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)), ++ _M_name_messages(__s) + { -+ const size_t __len = std::strlen(__s) + 1; -+ char* __tmp = new char[__len]; -+ std::memcpy(__tmp, __s, __len); ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); + _M_name_messages = __tmp; -+ -+ // Last to avoid leaking memory if new throws. -+ _M_c_locale_messages = _S_clone_c_locale(__cloc); + } + + template @@ -1363,9 +1344,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gc + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc @@ -0,0 +1,692 @@ +// std::moneypunct implementation details, GNU version -*- C++ -*- + @@ -1384,7 +1364,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc g + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -1579,7 +1559,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc g + } + break; + default: -+ __ret = pattern(); ++ ; + } + return __ret; + } @@ -1774,9 +1754,9 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc g +# 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; ++# else ++ _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; @@ -1929,9 +1909,9 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc g +# 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; ++# else ++ _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; @@ -2059,10 +2039,9 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc g + } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-25 22:18:37.000000000 -0700 -@@ -0,0 +1,173 @@ +--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc +@@ -0,0 +1,160 @@ +// std::numpunct implementation details, GNU version -*- C++ -*- + +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. @@ -2080,7 +2059,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gc + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -2195,25 +2174,12 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gc + { + // Named locale. + // NB: In the GNU model wchar_t is always 32 bit wide. -+#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 { 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 = ""; @@ -2236,9 +2202,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gc + { delete _M_data; } + #endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-25 22:18:37.000000000 -0700 +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc @@ -0,0 +1,406 @@ +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- + @@ -2257,7 +2222,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4 + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -2646,13 +2611,12 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4 + } +#endif +} -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h 2005-10-21 02:34:06.000000000 -0600 -@@ -0,0 +1,76 @@ +--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h ++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h +@@ -0,0 +1,68 @@ +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- + -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ++// Copyright (C) 2001, 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 @@ -2667,7 +2631,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4. + +// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, ++// 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 @@ -2689,33 +2653,25 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4. + template + __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 + __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 + __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(NULL) ++ _M_name_timepunct(__s) + { -+ const size_t __len = std::strlen(__s) + 1; -+ char* __tmp = new char[__len]; -+ std::memcpy(__tmp, __s, __len); ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); + _M_name_timepunct = __tmp; -+ -+ try -+ { _M_initialize_timepunct(__cloc); } -+ catch(...) -+ { -+ delete [] _M_name_timepunct; -+ __throw_exception_again; -+ } ++ _M_initialize_timepunct(__cloc); + } + + template @@ -2726,307 +2682,9 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4. + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h 2006-03-25 22:06:30.000000000 -0700 -@@ -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::_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-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h 2006-03-25 22:06:30.000000000 -0700 -@@ -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:: -+ is(mask __m, char __c) const -+ { return _M_table[static_cast(__c)] & __m; } -+ -+ const char* -+ ctype:: -+ is(const char* __low, const char* __high, mask* __vec) const -+ { -+ while (__low < __high) -+ *__vec++ = _M_table[static_cast(*__low++)]; -+ return __high; -+ } -+ -+ const char* -+ ctype:: -+ scan_is(mask __m, const char* __low, const char* __high) const -+ { -+ while (__low < __high -+ && !(_M_table[static_cast(*__low)] & __m)) -+ ++__low; -+ return __low; -+ } -+ -+ const char* -+ ctype:: -+ scan_not(mask __m, const char* __low, const char* __high) const -+ { -+ while (__low < __high -+ && (_M_table[static_cast(*__low)] & __m) != 0) -+ ++__low; -+ return __low; -+ } -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2006-03-25 22:06:30.000000000 -0700 -@@ -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::classic_table() throw() -+ { return __C_ctype_b; } -+ -+ ctype::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::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::do_toupper(char __c) const -+ { return _M_toupper[static_cast(__c)]; } -+ -+ const char* -+ ctype::do_toupper(char* __low, const char* __high) const -+ { -+ while (__low < __high) -+ { -+ *__low = _M_toupper[static_cast(*__low)]; -+ ++__low; -+ } -+ return __high; -+ } -+ -+ char -+ ctype::do_tolower(char __c) const -+ { return _M_tolower[static_cast(__c)]; } -+ -+ const char* -+ ctype::do_tolower(char* __low, const char* __high) const -+ { -+ while (__low < __high) -+ { -+ *__low = _M_tolower[static_cast(*__low)]; -+ ++__low; -+ } -+ return __high; -+ } -diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 17:00:00.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h 2006-03-25 22:06:30.000000000 -0700 -@@ -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 -+ -+#include -+ -+// We must not see the optimized string functions GNU libc defines. -+#define __NO_STRING_INLINES -+ -+#endif -diff -urN gcc-4.1.0-dist/libstdc++-v3/configure gcc-4.1.0/libstdc++-v3/configure ---- gcc-4.1.0-dist/libstdc++-v3/configure 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/configure 2006-03-25 22:06:30.000000000 -0700 -@@ -4005,6 +4005,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]+$' -@@ -5740,7 +5745,7 @@ +--- gcc/libstdc++-v3/configure ++++ gcc/libstdc++-v3/configure +@@ -5764,7 +5764,7 @@ enableval="$enable_clocale" case "$enableval" in @@ -3035,7 +2693,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/configure gcc-4.1.0/libstdc++-v3/configure *) { { 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; }; } ;; -@@ -5765,6 +5770,9 @@ +@@ -5789,6 +5789,9 @@ # Default to "generic". if test $enable_clocale_flag = auto; then case ${target_os} in @@ -3045,7 +2703,7 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/configure gcc-4.1.0/libstdc++-v3/configure linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ -@@ -5995,6 +6003,76 @@ +@@ -6019,6 +6022,76 @@ CTIME_CC=config/locale/generic/time_members.cc CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h ;; @@ -3122,137 +2780,8 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/configure gcc-4.1.0/libstdc++-v3/configure esac # This is where the testsuite looks for locale catalogs, using the -diff -urN gcc-4.1.0-dist/libstdc++-v3/configure.host gcc-4.1.0/libstdc++-v3/configure.host ---- gcc-4.1.0-dist/libstdc++-v3/configure.host 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/configure.host 2006-03-25 22:06:30.000000000 -0700 -@@ -261,6 +261,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-dist/libstdc++-v3/crossconfig.m4 gcc-4.1.0/libstdc++-v3/crossconfig.m4 ---- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/crossconfig.m4 2006-03-25 22:06:30.000000000 -0700 -@@ -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-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h ---- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-25 22:06:30.000000000 -0700 +--- gcc/libstdc++-v3/include/c_compatibility/wchar.h ++++ gcc/libstdc++-v3/include/c_compatibility/wchar.h @@ -101,7 +101,9 @@ using std::wmemcpy; using std::wmemmove; @@ -3263,10 +2792,9 @@ diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.0/ #if _GLIBCXX_USE_C99 using std::wcstold; -diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h ---- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-26 12:08:28.000000000 -0700 -+++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-25 22:06:30.000000000 -0700 -@@ -180,7 +180,9 @@ +--- gcc/libstdc++-v3/include/c_std/std_cwchar.h ++++ gcc/libstdc++-v3/include/c_std/std_cwchar.h +@@ -182,7 +182,9 @@ using ::wcscoll; using ::wcscpy; using ::wcscspn; diff --git a/base/uclibc/pkg_patch/gcc/203-uclibc-locale-no__x.patch b/base/uclibc/pkg_patch/gcc/203-uclibc-locale-no__x.patch new file mode 100644 index 000000000..b10f1a38c --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/203-uclibc-locale-no__x.patch @@ -0,0 +1,229 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/203-uclibc-locale-no__x.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- 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 + #include + +-#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 + #include + +-#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 + +-#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 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& __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/base/uclibc/pkg_patch/gcc/204-uclibc-locale-wchar_fix.patch b/base/uclibc/pkg_patch/gcc/204-uclibc-locale-wchar_fix.patch new file mode 100644 index 000000000..8c928072d --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/204-uclibc-locale-wchar_fix.patch @@ -0,0 +1,64 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/204-uclibc-locale-wchar_fix.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- 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/base/uclibc/pkg_patch/gcc/205-uclibc-locale-update.patch b/base/uclibc/pkg_patch/gcc/205-uclibc-locale-update.patch new file mode 100644 index 000000000..c50759b83 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/205-uclibc-locale-update.patch @@ -0,0 +1,363 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/205-uclibc-locale-update.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- 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 +@@ -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/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 +@@ -33,9 +33,14 @@ + + // Written by Benjamin Kosnik + ++#include ++#ifdef __UCLIBC_HAS_LOCALE__ + #define _LIBC + #include + #undef _LIBC ++#else ++#include ++#endif + #include + + namespace std +@@ -138,20 +143,34 @@ + ctype:: + 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:: + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const +--- 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 +@@ -47,18 +47,21 @@ + template + 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 + 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 +--- 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 +@@ -33,9 +33,14 @@ + + // Written by Benjamin Kosnik + ++#include ++#ifdef __UCLIBC_HAS_LOCALE__ + #define _LIBC + #include + #undef _LIBC ++#else ++#include ++#endif + #include + + #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 +@@ -33,9 +33,14 @@ + + // Written by Benjamin Kosnik + ++#include ++#ifdef __UCLIBC_HAS_LOCALE__ + #define _LIBC + #include + #undef _LIBC ++#else ++#include ++#endif + #include + + #ifdef __UCLIBC_MJN3_ONLY__ +--- 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 +@@ -37,25 +37,33 @@ + template + __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 + __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 + __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 +--- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200 ++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200 +@@ -39,21 +39,23 @@ + #pragma GCC system_header + + #include // get std::strlen +-#include // get std::snprintf or std::sprintf ++#include // get std::vsnprintf or std::vsprintf + #include + #include // For codecvt + #ifdef __UCLIBC_MJN3_ONLY__ + #warning fix this + #endif +-#ifdef __UCLIBC_HAS_LOCALE__ ++#ifdef _GLIBCXX_USE_ICONV + #include // For codecvt using iconv, iconv_t + #endif +-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ +-#include // For messages ++#ifdef HAVE_LIBINTL_H ++#include // For messages + #endif ++#include + + #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 + +@@ -62,7 +64,7 @@ + #endif + // #define _GLIBCXX_NUM_CATEGORIES 6 + #define _GLIBCXX_NUM_CATEGORIES 0 +- ++ + #ifdef __UCLIBC_HAS_XLOCALE__ + namespace __gnu_cxx + { +@@ -79,22 +81,24 @@ + typedef int* __c_locale; + #endif + +- // Convert numeric value of type _Tv to string and return length of +- // string. If snprintf is available use it, otherwise fall back to +- // the unsafe sprintf which, in general, can be dangerous and should ++ // Convert numeric value of type double to string and return length of ++ // string. If vsnprintf is available use it, otherwise fall back to ++ // the unsafe vsprintf which, in general, can be dangerous and should + // be avoided. +- template +- int +- __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) ++ inline int ++ __convert_from_v(const __c_locale& ++#ifndef __UCLIBC_HAS_XCLOCALE__ ++ __cloc __attribute__ ((__unused__)) ++#endif ++ , ++ char* __out, ++ const int __size, ++ const char* __fmt, ...) + { ++ va_list __args; ++#ifdef __UCLIBC_HAS_XCLOCALE__ + __c_locale __old = __gnu_cxx::__uselocale(__cloc); + #else +- _Tv __v, const __c_locale&, int __prec) +- { + # ifdef __UCLIBC_HAS_LOCALE__ + char* __old = std::setlocale(LC_ALL, NULL); + char* __sav = new char[std::strlen(__old) + 1]; +@@ -103,7 +107,9 @@ + # endif + #endif + +- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); ++ va_start(__args, __fmt); ++ const int __ret = std::vsnprintf(__out, __size, __fmt, __args); ++ va_end(__args); + + #ifdef __UCLIBC_HAS_XCLOCALE__ + __gnu_cxx::__uselocale(__old); diff --git a/base/uclibc/pkg_patch/gcc/300-libstdc++-pic.patch b/base/uclibc/pkg_patch/gcc/300-libstdc++-pic.patch index 96ea61e02..b1541f46d 100644 --- a/base/uclibc/pkg_patch/gcc/300-libstdc++-pic.patch +++ b/base/uclibc/pkg_patch/gcc/300-libstdc++-pic.patch @@ -1,9 +1,8 @@ # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # -# Filename: package/.../uclibc/pkg_patch/gcc-300-libstdc++-pic.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project +# Filename: package/.../uclibc/pkg_patch/gcc/300-libstdc++-pic.patch +# Copyright (C) 2009 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -14,24 +13,27 @@ # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- -diff -urN gcc-4.0.0-200/libstdc++-v3/src/Makefile.am gcc-4.0.0/libstdc++-v3/src/Makefile.am ---- gcc-4.0.0-200/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600 -+++ gcc-4.0.0/libstdc++-v3/src/Makefile.am 2005-04-28 21:42:18.614344056 -0500 -@@ -214,6 +214,10 @@ + +# DP: Build and install libstdc++_pic.a library. + +--- gcc/libstdc++-v3/src/Makefile.am ++++ gcc/libstdc++-v3/src/Makefile.am +@@ -214,6 +214,12 @@ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ +install-exec-local: -+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o ++ifeq ($(enable_shared),yes) ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++endif + # Added bits to build debug library. if GLIBCXX_BUILD_DEBUG all-local: build_debug -diff -urN gcc-4.0.0-200/libstdc++-v3/src/Makefile.in gcc-4.0.0/libstdc++-v3/src/Makefile.in ---- gcc-4.0.0-200/libstdc++-v3/src/Makefile.in 2005-02-01 00:56:27.000000000 -0600 -+++ gcc-4.0.0/libstdc++-v3/src/Makefile.in 2005-04-28 21:44:20.868758560 -0500 -@@ -625,7 +625,7 @@ +--- gcc/libstdc++-v3/src/Makefile.in ++++ gcc/libstdc++-v3/src/Makefile.in +@@ -627,7 +627,7 @@ install-data-am: install-data-local @@ -40,23 +42,24 @@ diff -urN gcc-4.0.0-200/libstdc++-v3/src/Makefile.in gcc-4.0.0/libstdc++-v3/src/ install-info: install-info-am -@@ -664,7 +664,7 @@ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ -- uninstall-toolexeclibLTLIBRARIES -+ uninstall-toolexeclibLTLIBRARIES install-exec-local - - @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP) - @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver -@@ -743,6 +743,11 @@ +@@ -660,6 +660,7 @@ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-exec \ ++ install-exec-local \ + install-exec-am install-info install-info-am install-man \ + install-strip install-toolexeclibLTLIBRARIES installcheck \ + installcheck-am installdirs maintainer-clean \ +@@ -743,6 +743,13 @@ install_debug: (cd ${debugdir} && $(MAKE) \ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) + +install-exec-local: ++ifeq ($(enable_shared),yes) + $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++endif + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/base/uclibc/pkg_patch/gcc/301-missing-execinfo_h.patch b/base/uclibc/pkg_patch/gcc/301-missing-execinfo_h.patch index 5db071324..c633c6cff 100644 --- a/base/uclibc/pkg_patch/gcc/301-missing-execinfo_h.patch +++ b/base/uclibc/pkg_patch/gcc/301-missing-execinfo_h.patch @@ -1,9 +1,8 @@ # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # -# Filename: package/.../uclibc/pkg_patch/gcc-301-missing-execinfo_h.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project +# Filename: package/.../uclibc/pkg_patch/gcc/301-missing-execinfo_h.patch +# Copyright (C) 2009 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -14,6 +13,7 @@ # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- + --- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 +++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 @@ -500,7 +500,7 @@ diff --git a/base/uclibc/pkg_patch/gcc/302-c99-snprintf.patch b/base/uclibc/pkg_patch/gcc/302-c99-snprintf.patch index 14c6b5712..e719e3e86 100644 --- a/base/uclibc/pkg_patch/gcc/302-c99-snprintf.patch +++ b/base/uclibc/pkg_patch/gcc/302-c99-snprintf.patch @@ -1,9 +1,8 @@ # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # -# Filename: package/.../uclibc/pkg_patch/gcc-302-c99-snprintf.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project +# Filename: package/.../uclibc/pkg_patch/gcc/302-c99-snprintf.patch +# Copyright (C) 2009 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -14,6 +13,7 @@ # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- + --- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500 +++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500 @@ -142,7 +142,7 @@ diff --git a/base/uclibc/pkg_patch/gcc/303-c99-complex-ugly-hack.patch b/base/uclibc/pkg_patch/gcc/303-c99-complex-ugly-hack.patch index 8728ad6f0..71123dd10 100644 --- a/base/uclibc/pkg_patch/gcc/303-c99-complex-ugly-hack.patch +++ b/base/uclibc/pkg_patch/gcc/303-c99-complex-ugly-hack.patch @@ -1,9 +1,8 @@ # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # -# Filename: package/.../uclibc/pkg_patch/gcc-303-c99-complex-ugly-hack.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project +# Filename: package/.../uclibc/pkg_patch/gcc/303-c99-complex-ugly-hack.patch +# Copyright (C) 2009 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -14,6 +13,7 @@ # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- + --- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500 +++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500 @@ -7194,6 +7194,9 @@ diff --git a/base/uclibc/pkg_patch/gcc/305-libmudflap-susv3-legacy.patch b/base/uclibc/pkg_patch/gcc/305-libmudflap-susv3-legacy.patch new file mode 100644 index 000000000..e16f1d318 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/305-libmudflap-susv3-legacy.patch @@ -0,0 +1,65 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/305-libmudflap-susv3-legacy.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Index: gcc-4.2/libmudflap/mf-hooks2.c +=================================================================== +--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834) ++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy) +@@ -427,7 +427,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -437,7 +437,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -447,7 +447,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -456,7 +456,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -465,7 +465,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/base/uclibc/pkg_patch/gcc/306-libstdc++-namespace.patch b/base/uclibc/pkg_patch/gcc/306-libstdc++-namespace.patch new file mode 100644 index 000000000..8c2ce1ed8 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/306-libstdc++-namespace.patch @@ -0,0 +1,52 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/306-libstdc++-namespace.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h +--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100 ++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100 +@@ -32,7 +32,8 @@ + // + + // Written by Benjamin Kosnik +- ++namespace std ++{ + #ifdef __UCLIBC_MJN3_ONLY__ + #warning fix prototypes for *textdomain funcs + #endif +@@ -115,3 +116,4 @@ + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } ++} +diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h +--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100 ++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100 +@@ -33,7 +33,8 @@ + // + + // Written by Benjamin Kosnik +- ++namespace std ++{ + template + __timepunct<_CharT>::__timepunct(size_t __refs) + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), +@@ -74,3 +75,4 @@ + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } ++} diff --git a/base/uclibc/pkg_patch/gcc/307-locale_facets.patch b/base/uclibc/pkg_patch/gcc/307-locale_facets.patch new file mode 100644 index 000000000..3ca33d773 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/307-locale_facets.patch @@ -0,0 +1,42 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/307-locale_facets.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +This patch fixes a bug into ostream::operator<<(double) due to the wrong size +passed into the __convert_from_v method. The wrong size is then passed to +std::snprintf function, that, on uClibc, doens't handle sized 0 buffer. + +Signed-off-by: Carmelo Amoroso + +--- gcc-4.2.1/libstdc++-v3/include/bits/locale_facets.tcc 2006-10-17 18:43:47.000000000 +0200 ++++ gcc-4.2.1-st/libstdc++-v3/include/bits/locale_facets.tcc 2007-08-22 18:54:23.000000000 +0200 +@@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE + const int __cs_size = __fixed ? __max_exp + __prec + 4 + : __max_digits * 2 + __prec; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf, ++ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, + __prec, __v); + #endif + +@@ -1777,7 +1777,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE + // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'. + const int __cs_size = numeric_limits::max_exponent10 + 3; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +- int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf", ++ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf", + 0, __units); + #endif + string_type __digits(__len, char_type()); diff --git a/base/uclibc/pkg_patch/gcc/402-libbackend_dep_gcov-iov.h.patch b/base/uclibc/pkg_patch/gcc/402-libbackend_dep_gcov-iov.h.patch new file mode 100644 index 000000000..1d86b3e08 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/402-libbackend_dep_gcov-iov.h.patch @@ -0,0 +1,29 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/402-libbackend_dep_gcov-iov.h.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Index: gcc-4.2/gcc/Makefile.in +=================================================================== +--- gcc-4.2/gcc/Makefile.in (revision 121758) ++++ gcc-4.2/gcc/Makefile.in (working copy) +@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H) + # FIXME: writing proper dependencies for this is a *LOT* of work. + libbackend.o : $(OBJS-common:.o=.c) $(out_file) \ + insn-config.h insn-flags.h insn-codes.h insn-constants.h \ +- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) ++ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h + $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ + -DTARGET_NAME=\"$(target_noncanonical)\" \ + -DLOCALEDIR=\"$(localedir)\" \ diff --git a/base/uclibc/pkg_patch/gcc/602-sdk-libstdc++-includes.patch b/base/uclibc/pkg_patch/gcc/602-sdk-libstdc++-includes.patch deleted file mode 100644 index 1295058e0..000000000 --- a/base/uclibc/pkg_patch/gcc/602-sdk-libstdc++-includes.patch +++ /dev/null @@ -1,38 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../uclibc/pkg_patch/gcc-602-sdk-libstdc++-includes.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- -diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am ---- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500 -+++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500 -@@ -18,5 +18,5 @@ - $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once - - # -I/-D flags to pass when compiling. --AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include - -diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am ---- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500 -+++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500 -@@ -32,7 +32,7 @@ - - libmath_la_SOURCES = stubs.c - --AM_CPPFLAGS = $(CANADIAN_INCLUDES) -+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include - - # Only compiling "C" sources in this directory. - LIBTOOL = @LIBTOOL@ --tag CC diff --git a/base/uclibc/pkg_patch/gcc/800-arm-bigendian.patch b/base/uclibc/pkg_patch/gcc/800-arm-bigendian.patch new file mode 100644 index 000000000..39c25d1d1 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/800-arm-bigendian.patch @@ -0,0 +1,83 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/800-arm-bigendian.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +By Lennert Buytenhek +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +--- gcc-4.2.0/gcc/config/arm/linux-elf.h ++++ gcc-4.2.0/gcc/config/arm/linux-elf.h +@@ -28,19 +28,33 @@ + #undef TARGET_VERSION + #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + #undef TARGET_DEFAULT_FLOAT_ABI + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (0) ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } + + /* Now we define the strings used to build the spec file. */ + #undef LIB_SPEC +@@ -61,7 +75,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + + #undef LINK_SPEC +--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200 ++++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200 +@@ -696,6 +696,11 @@ + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" + tmake_file="${tmake_file} t-linux arm/t-arm" + case ${target} in ++ arm*b-*) ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ++ ;; ++ esac ++ case ${target} in + arm*-*-linux-*eabi) + tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" + tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" diff --git a/base/uclibc/pkg_patch/gcc/900-crt-align-1.patch b/base/uclibc/pkg_patch/gcc/900-crt-align-1.patch deleted file mode 100644 index 8ed6e0656..000000000 --- a/base/uclibc/pkg_patch/gcc/900-crt-align-1.patch +++ /dev/null @@ -1,58 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../uclibc/pkg_patch/gcc-900-crt-align-1.patch -# Copyright (C) 2006 The OpenSDE Project -# Copyright (C) 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - -2006-03-18 H.J. Lu - - * config/i386/crtfastmath.c (set_fast_math): Align fxsave to - 16byte by hand. - -Reference: -http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01179.html - ---- ./gcc/config/i386/crtfastmath.c.align 2005-11-04 14:13:48.000000000 -0800 -+++ ./gcc/config/i386/crtfastmath.c 2006-03-18 08:34:13.000000000 -0800 -@@ -75,7 +75,7 @@ set_fast_math (void) - if (edx & FXSAVE) - { - /* Check if DAZ is available. */ -- struct -+ struct fxsave - { - unsigned short int cwd; - unsigned short int swd; -@@ -90,13 +90,17 @@ set_fast_math (void) - long int st_space[32]; - long int xmm_space[32]; - long int padding[56]; -- } __attribute__ ((aligned (16))) fxsave; -+ } *fxsave; - -- __builtin_memset (&fxsave, 0, sizeof (fxsave)); -+ fxsave = (struct fxsave *) -+ (((unsigned long) __builtin_alloca (sizeof (*fxsave) + 15)) -+ & ~15L); - -- asm volatile ("fxsave %0" : "=m" (fxsave) : "m" (fxsave)); -+ __builtin_memset (fxsave, 0, sizeof (*fxsave)); - -- if (fxsave.mxcsr_mask & MXCSR_DAZ) -+ asm volatile ("fxsave %0" : "=m" (*fxsave) : "m" (*fxsave)); -+ -+ if (fxsave->mxcsr_mask & MXCSR_DAZ) - mxcsr |= MXCSR_DAZ; - } - diff --git a/base/uclibc/pkg_patch/gcc/904-flatten-switch-stmt-00.patch b/base/uclibc/pkg_patch/gcc/904-flatten-switch-stmt-00.patch new file mode 100644 index 000000000..48bfae823 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/904-flatten-switch-stmt-00.patch @@ -0,0 +1,169 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/904-flatten-switch-stmt-00.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Hi, + +The attached patch makes sure that we create smaller object code for +simple switch statements. We just make sure to flatten the switch +statement into an if-else chain, basically. + +This fixes a size-regression as compared to gcc-3.4, as can be seen +below. + +2007-04-15 Bernhard Fischer <..> + + * stmt.c (expand_case): Do not create a complex binary tree when + optimizing for size but rather use the simple ordered list. + (emit_case_nodes): do not emit jumps to the default_label when + optimizing for size. + +Not regtested so far. +Comments? + +Attached is the test switch.c mentioned below. + +$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do +gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done +$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do +gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done + +$ size switch-*.o + text data bss dec hex filename + 169 0 0 169 a9 switch-2.95.o + 115 0 0 115 73 switch-3.3.o + 103 0 0 103 67 switch-3.4.o + 124 0 0 124 7c switch-4.0.o + 124 0 0 124 7c switch-4.1.o + 124 0 0 124 7c switch-4.2.orig-HEAD.o + 95 0 0 95 5f switch-4.3-HEAD.o + 124 0 0 124 7c switch-4.3.orig-HEAD.o + 166 0 0 166 a6 switch-CHAIN-2.95.o + 111 0 0 111 6f switch-CHAIN-3.3.o + 95 0 0 95 5f switch-CHAIN-3.4.o + 95 0 0 95 5f switch-CHAIN-4.0.o + 95 0 0 95 5f switch-CHAIN-4.1.o + 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o + 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o + 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o + + +Content-Type: text/x-diff; charset=us-ascii +Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff" + +Index: gcc-4.2.0/gcc/stmt.c +=================================================================== +--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843) ++++ gcc-4.2.0/gcc/stmt.c (working copy) +@@ -2517,7 +2517,11 @@ expand_case (tree exp) + use_cost_table + = (TREE_CODE (orig_type) != ENUMERAL_TYPE + && estimate_case_costs (case_list)); +- balance_case_nodes (&case_list, NULL); ++ /* When optimizing for size, we want a straight list to avoid ++ jumps as much as possible. This basically creates an if-else ++ chain. */ ++ if (!optimize_size) ++ balance_case_nodes (&case_list, NULL); + emit_case_nodes (index, case_list, default_label, index_type); + emit_jump (default_label); + } +@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt + { + if (!node_has_low_bound (node, index_type)) + { ++ if (!optimize_size) /* don't jl to the .default_label. */ + emit_cmp_and_jump_insns (index, + convert_modes + (mode, imode, + + +Content-Type: text/x-csrc; charset=us-ascii +Content-Disposition: attachment; filename="switch.c" + +int +commutative_tree_code (int code) +{ +#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret; +#ifndef CHAIN + switch (code) + { +# if 1 + CASE(1,3) + CASE(3,2) + CASE(5,8) + CASE(7,1) + CASE(33,4) + CASE(44,9) + CASE(55,10) + CASE(66,-1) + CASE(77,99) + CASE(666,0) +# else + case 1: + return 3; + case 3: + return 2; + case 5: + return 8; + case 7: + return 1; + case 33: + return 4; + case 44: + return 9; + case 55: + return 10; + case 66: + return -1; + case 77: + return 99; + case 666: + return 0; +# endif + default: + break; + } + return 4711; + +#else + if (code == 1) + return 3; + else if (code == 3) + return 2; + else if (code == 5) + return 8; + else if (code == 7) + return 1; + else if (code == 33) + return 4; + else if (code == 44) + return 9; + else if (code == 55) + return 10; + else if (code == 66) + return -1; + else if (code == 77) + return 99; + else if (code == 666) + return 0; + else + return 4711; +#endif +} + + +--AhhlLboLdkugWU4S-- + diff --git a/base/uclibc/pkg_patch/gcc/910-soft-float.patch b/base/uclibc/pkg_patch/gcc/910-soft-float.patch new file mode 100644 index 000000000..b3cd50dc8 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/910-soft-float.patch @@ -0,0 +1,42 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/910-soft-float.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- gcc-4.2-20061205/gcc/config/arm/t-linux 2006-12-08 15:18:33.000000000 -0800 ++++ gcc-4.2-20061205/gcc/config/arm/t-linux 2006-12-08 15:18:33.000000000 -0800 +@@ -4,7 +4,10 @@ + LIBGCC2_DEBUG_CFLAGS = -g0 + + LIB1ASMSRC = arm/lib1funcs.asm +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float + +--- gcc-4.2-20061205/gcc/config/arm/linux-elf.h 2006-12-08 15:18:33.000000000 -0800 ++++ gcc-4.2-20061205/gcc/config/arm/linux-elf.h 2006-12-08 15:18:33.000000000 -0800 +@@ -63,7 +63,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + diff --git a/base/uclibc/pkg_patch/gcc/920-soft-float.patch b/base/uclibc/pkg_patch/gcc/920-soft-float.patch new file mode 100644 index 000000000..2ac034349 --- /dev/null +++ b/base/uclibc/pkg_patch/gcc/920-soft-float.patch @@ -0,0 +1,37 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../uclibc/pkg_patch/gcc/920-soft-float.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +diff -uNpr gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c +--- gcc-4.2.1_orig/gcc/config/rs6000/darwin-ldouble.c 2007-03-05 11:54:00.000000000 -0500 ++++ gcc-4.2.1/gcc/config/rs6000/darwin-ldouble.c 2008-01-31 17:51:24.000000000 -0500 +@@ -70,6 +70,8 @@ Software Foundation, 51 Franklin Street, + but GCC currently generates poor code when a union is used to turn + a long double into a pair of doubles. */ + ++#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__) ++ + long double __gcc_qadd (double, double, double, double); + long double __gcc_qsub (double, double, double, double); + long double __gcc_qmul (double, double, double, double); +@@ -219,8 +221,6 @@ __gcc_qdiv (double a, double b, double c + return z.ldval; + } + +-#if defined (_SOFT_FLOAT) && defined (__LONG_DOUBLE_128__) +- + long double __gcc_qneg (double, double); + int __gcc_qeq (double, double, double, double); + int __gcc_qne (double, double, double, double); diff --git a/base/uclibc/pkg_patch/gcc/index.patch b/base/uclibc/pkg_patch/gcc/index.patch deleted file mode 100644 index 4958dad32..000000000 --- a/base/uclibc/pkg_patch/gcc/index.patch +++ /dev/null @@ -1,38 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../uclibc/pkg_patch/gcc-index.patch -# Copyright (C) 2006 The OpenSDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- gcc-4.1.1/libstdc++-v3/include/ext/rope.orig 2006-12-14 22:24:49.000000000 -0300 -+++ gcc-4.1.1/libstdc++-v3/include/ext/rope 2006-12-14 22:25:32.000000000 -0300 -@@ -66,6 +66,8 @@ - - #include // For uninitialized_copy_n - -+#undef index -+ - namespace __gnu_cxx - { - using std::size_t; ---- gcc-4.1.1/libstdc++-v3/include/ext/ropeimpl.h.orig 2006-12-14 22:24:54.000000000 -0300 -+++ gcc-4.1.1/libstdc++-v3/include/ext/ropeimpl.h 2006-12-14 22:26:08.000000000 -0300 -@@ -53,6 +53,8 @@ - #include // For uninitialized_copy_n - #include // For power - -+#undef index -+ - namespace __gnu_cxx - { - using std::size_t;