summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2008-08-20 23:12:27 +0000
committerKhem Raj <raj.khem@gmail.com>2008-08-20 23:12:27 +0000
commit347f41f1c6caef14cd1a30315a6ce8dd2692da76 (patch)
tree8a0f0163926067e2543ad286f0e9add8daee29f5
parent77a319c9b302cd96ad7419c80a4334ae5a71b275 (diff)
Enable gcc 4.3.1 to build for uclibc.
Revive the uclibc locale support. Fix gcc native breakage for 4.3.1.
-rw-r--r--packages/gcc/gcc-4.3.1.inc24
-rw-r--r--packages/gcc/gcc-4.3.1/100-uclibc-conf.patch179
-rw-r--r--packages/gcc/gcc-4.3.1/200-uclibc-locale.patch423
-rw-r--r--packages/gcc/gcc-4.3.1/203-uclibc-locale-no__x.patch74
-rw-r--r--packages/gcc/gcc-4.3.1/205-uclibc-locale-update.patch315
-rw-r--r--packages/gcc/gcc-4.3.1/302-c99-snprintf.patch12
-rw-r--r--packages/gcc/gcc-4.3.1/307-locale_facets.patch19
-rw-r--r--packages/gcc/gcc-4.3.1/cache-amnesia.patch28
-rw-r--r--packages/gcc/gcc-4.3.1/gcc-4.3.1-SYSROOT_CFLAGS_FOR_TARGET.patch2077
-rw-r--r--packages/gcc/gcc-4.3.1/zecke-xgcc-cpp.patch12
-rw-r--r--packages/gcc/gcc-cross-sdk_4.3.1.bb2
-rw-r--r--packages/gcc/gcc-cross_4.3.1.bb2
-rw-r--r--packages/gcc/gcc_4.3.1.bb3
13 files changed, 2185 insertions, 985 deletions
diff --git a/packages/gcc/gcc-4.3.1.inc b/packages/gcc/gcc-4.3.1.inc
index b14dd4acf5..f1f29710a3 100644
--- a/packages/gcc/gcc-4.3.1.inc
+++ b/packages/gcc/gcc-4.3.1.inc
@@ -1,4 +1,4 @@
-# No uclibc, armeb and thumb patches - really needs checking
+# No armeb and thumb patches - really needs checking
DEFAULT_PREFERENCE = "-99"
require gcc-common.inc
@@ -24,19 +24,19 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \
file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \
file://debian/pr30961.dpatch;patch=1;pnum=0 \
-# file://100-uclibc-conf.patch;patch=1 \
-# file://103-uclibc-conf-noupstream.patch;patch=1 \
-# file://200-uclibc-locale.patch;patch=1 \
-# file://203-uclibc-locale-no__x.patch;patch=1 \
-# file://204-uclibc-locale-wchar_fix.patch;patch=1 \
-# file://205-uclibc-locale-update.patch;patch=1 \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://103-uclibc-conf-noupstream.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://203-uclibc-locale-no__x.patch;patch=1 \
+ file://204-uclibc-locale-wchar_fix.patch;patch=1 \
+ file://205-uclibc-locale-update.patch;patch=1 \
file://301-missing-execinfo_h.patch;patch=1 \
-# file://302-c99-snprintf.patch;patch=1 \
-# file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
file://304-index_macro.patch;patch=1 \
file://305-libmudflap-susv3-legacy.patch;patch=1 \
-# file://306-libstdc++-namespace.patch;patch=1 \
-# file://307-locale_facets.patch;patch=1 \
+ file://306-libstdc++-namespace.patch;patch=1 \
+ file://307-locale_facets.patch;patch=1 \
# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
file://602-sdk-libstdc++-includes.patch;patch=1 \
file://740-sh-pr24836.patch;patch=1 \
@@ -48,7 +48,6 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
# file://arm-thumb.patch;patch=1 \
# file://arm-thumb-cache.patch;patch=1 \
file://ldflags.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
file://gfortran.patch;patch=1 \
@@ -60,6 +59,7 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://gcc-release-branch/PR-36500-fix-neon.patch;patch=1 \
file://gcc-4.3.1-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \
file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/packages/gcc/gcc-4.3.1/100-uclibc-conf.patch b/packages/gcc/gcc-4.3.1/100-uclibc-conf.patch
index 4243ff7b91..0b799607e8 100644
--- a/packages/gcc/gcc-4.3.1/100-uclibc-conf.patch
+++ b/packages/gcc/gcc-4.3.1/100-uclibc-conf.patch
@@ -1,119 +1,7 @@
---- gcc/libgomp/configure
-+++ gcc/libgomp/configure
-@@ -3771,7 +3771,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- gcc/gcc/config/cris/linux.h
-+++ 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 CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
-+#endif
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-
---- gcc/libstdc++-v3/configure
-+++ gcc/libstdc++-v3/configure
-@@ -4276,7 +4276,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- gcc/zlib/configure
-+++ gcc/zlib/configure
-@@ -3422,7 +3422,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- gcc/libobjc/configure
-+++ gcc/libobjc/configure
-@@ -3309,7 +3309,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- gcc/libgfortran/configure
-+++ gcc/libgfortran/configure
-@@ -3695,7 +3695,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- 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/boehm-gc/configure
-+++ gcc/boehm-gc/configure
-@@ -4316,7 +4316,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- gcc/libffi/configure
-+++ gcc/libffi/configure
-@@ -3453,7 +3453,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- gcc/libssp/configure
-+++ gcc/libssp/configure
-@@ -4409,7 +4409,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- gcc/contrib/regression/objs-gcc.sh
-+++ gcc/contrib/regression/objs-gcc.sh
+Index: gcc-4.3.1/contrib/regression/objs-gcc.sh
+===================================================================
+--- gcc-4.3.1.orig/contrib/regression/objs-gcc.sh 2007-12-24 15:18:57.000000000 -0800
++++ gcc-4.3.1/contrib/regression/objs-gcc.sh 2008-08-16 01:15:12.000000000 -0700
@@ -105,6 +105,10 @@
then
make all-gdb all-dejagnu all-ld || exit 1
@@ -125,61 +13,10 @@
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 @@
-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-
-@@ -1251,7 +1251,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
---- gcc/libjava/classpath/configure
-+++ gcc/libjava/classpath/configure
-@@ -4665,7 +4665,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- gcc/libjava/configure
-+++ gcc/libjava/configure
-@@ -5212,7 +5212,7 @@
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
---- 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
- ;;
-
---- gcc/ltconfig
-+++ gcc/ltconfig
+Index: gcc-4.3.1/libjava/classpath/ltconfig
+===================================================================
+--- gcc-4.3.1.orig/libjava/classpath/ltconfig 2007-06-03 16:18:43.000000000 -0700
++++ gcc-4.3.1/libjava/classpath/ltconfig 2008-08-16 01:15:12.000000000 -0700
@@ -603,7 +603,7 @@
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
diff --git a/packages/gcc/gcc-4.3.1/200-uclibc-locale.patch b/packages/gcc/gcc-4.3.1/200-uclibc-locale.patch
index ea21388b75..398f7a4436 100644
--- a/packages/gcc/gcc-4.3.1/200-uclibc-locale.patch
+++ b/packages/gcc/gcc-4.3.1/200-uclibc-locale.patch
@@ -1,6 +1,8 @@
---- gcc/libstdc++-v3/acinclude.m4
-+++ gcc/libstdc++-v3/acinclude.m4
-@@ -1369,7 +1369,7 @@
+Index: gcc-4.3.1/libstdc++-v3/acinclude.m4
+===================================================================
+--- gcc-4.3.1.orig/libstdc++-v3/acinclude.m4 2008-04-25 09:52:57.000000000 -0700
++++ gcc-4.3.1/libstdc++-v3/acinclude.m4 2008-08-19 01:15:23.000000000 -0700
+@@ -1349,7 +1349,7 @@
AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
[use MODEL for target locale package],
@@ -9,7 +11,7 @@
# 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 @@
+@@ -1370,6 +1370,9 @@
# Default to "generic".
if test $enable_clocale_flag = auto; then
case ${target_os} in
@@ -17,9 +19,9 @@
+ enable_clocale_flag=uclibc
+ ;;
linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- AC_EGREP_CPP([_GLIBCXX_ok], [
- #include <features.h>
-@@ -1528,6 +1531,40 @@
+ enable_clocale_flag=gnu
+ ;;
+@@ -1541,6 +1544,40 @@
CTIME_CC=config/locale/generic/time_members.cc
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
@@ -60,8 +62,10 @@
esac
# This is where the testsuite looks for locale catalogs, using the
---- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-08-19 01:38:05.000000000 -0700
@@ -0,0 +1,63 @@
+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
+
@@ -102,7 +106,7 @@
+#endif
+
+#ifdef __UCLIBC_HAS_XLOCALE__
-+
++
+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
+extern "C" __typeof(strcoll_l) __strcoll_l;
+extern "C" __typeof(strftime_l) __strftime_l;
@@ -123,11 +127,13 @@
+extern "C" __typeof(wcsftime_l) __wcsftime_l;
+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
+extern "C" __typeof(wctype_l) __wctype_l;
-+#endif
++#endif
+
+#endif // GLIBC 2.3 and later
---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-08-19 01:38:05.000000000 -0700
@@ -0,0 +1,160 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
@@ -184,11 +190,11 @@
+#define __duplocale(a) __c_locale()
+#endif
+
-+namespace std
++namespace std
+{
+ template<>
+ void
-+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+ if (!(__err & ios_base::failbit))
@@ -205,7 +211,7 @@
+
+ template<>
+ void
-+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+ if (!(__err & ios_base::failbit))
@@ -238,7 +244,7 @@
+ }
+
+ void
-+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
+ __c_locale __old)
+ {
+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
@@ -251,12 +257,12 @@
+ }
+#endif
+ }
-+
++
+ void
+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+ {
+ if (_S_get_c_locale() != __cloc)
-+ __freelocale(__cloc);
++ __freelocale(__cloc);
+ }
+
+ __c_locale
@@ -268,19 +274,19 @@
+{
+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
+ {
-+ "LC_CTYPE",
++ "LC_CTYPE",
+ "LC_NUMERIC",
-+ "LC_TIME",
-+ "LC_COLLATE",
++ "LC_TIME",
++ "LC_COLLATE",
+ "LC_MONETARY",
-+ "LC_MESSAGES",
++ "LC_MESSAGES",
+#if _GLIBCXX_NUM_CATEGORIES != 0
-+ "LC_PAPER",
-+ "LC_NAME",
++ "LC_PAPER",
++ "LC_NAME",
+ "LC_ADDRESS",
-+ "LC_TELEPHONE",
-+ "LC_MEASUREMENT",
-+ "LC_IDENTIFICATION"
++ "LC_TELEPHONE",
++ "LC_MEASUREMENT",
++ "LC_IDENTIFICATION"
+#endif
+ };
+}
@@ -289,8 +295,10 @@
+{
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
+} // namespace std
---- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-08-19 01:38:05.000000000 -0700
@@ -0,0 +1,117 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
@@ -356,7 +364,7 @@
+#endif
+// #define _GLIBCXX_NUM_CATEGORIES 6
+#define _GLIBCXX_NUM_CATEGORIES 0
-+
++
+#ifdef __UCLIBC_HAS_XLOCALE__
+namespace __gnu_cxx
+{
@@ -378,7 +386,7 @@
+ // be avoided.
+ template<typename _Tv>
+ int
-+ __convert_from_v(char* __out,
++ __convert_from_v(char* __out,
+ const int __size __attribute__ ((__unused__)),
+ const char* __fmt,
+#ifdef __UCLIBC_HAS_XCLOCALE__
@@ -409,9 +417,11 @@
+}
+
+#endif
---- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-@@ -0,0 +1,306 @@
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2008-08-19 01:39:14.000000000 -0700
+@@ -0,0 +1,308 @@
+// std::codecvt implementation details, GNU version -*- C++ -*-
+
+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
@@ -448,6 +458,8 @@
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#include <locale>
++#include <cstdlib> // For MB_CUR_MAX
++#include <climits> // For MB_LEN_MAX
+#include <bits/c++locale_internal.h>
+
+namespace std
@@ -456,7 +468,7 @@
+#ifdef _GLIBCXX_USE_WCHAR_T
+ codecvt_base::result
+ codecvt<wchar_t, char, mbstate_t>::
-+ do_out(state_type& __state, const intern_type* __from,
++ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const
@@ -526,12 +538,12 @@
+ __uselocale(__old);
+#endif
+
-+ return __ret;
++ return __ret;
+ }
-+
++
+ codecvt_base::result
+ codecvt<wchar_t, char, mbstate_t>::
-+ do_in(state_type& __state, const extern_type* __from,
++ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const
@@ -575,12 +587,12 @@
+ break;
+ }
+ __from_next = __from;
-+ __state = __tmp_state;
++ __state = __tmp_state;
+ __ret = error;
+ }
+ else if (__from_next && __from_next < __from_chunk_end)
+ {
-+ // It is unclear what to return in this case (see DR 382).
++ // It is unclear what to return in this case (see DR 382).
+ __to_next += __conv;
+ __ret = partial;
+ }
@@ -595,7 +607,7 @@
+ if (__to_next < __to_end)
+ {
+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
++ __tmp_state = __state;
+ ++__from_next;
+ *__to_next++ = L'\0';
+ }
@@ -608,10 +620,10 @@
+ __uselocale(__old);
+#endif
+
-+ return __ret;
++ return __ret;
+ }
+
-+ int
++ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_encoding() const throw()
+ {
@@ -627,9 +639,9 @@
+ __uselocale(__old);
+#endif
+ return __ret;
-+ }
++ }
+
-+ int
++ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_max_length() const throw()
+ {
@@ -643,8 +655,8 @@
+#endif
+ return __ret;
+ }
-+
-+ int
++
++ int
+ codecvt<wchar_t, char, mbstate_t>::
+ do_length(state_type& __state, const extern_type* __from,
+ const extern_type* __end, size_t __max) const
@@ -659,10 +671,10 @@
+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
+ // in case we advance past it and then continue, in a loop.
+ // NB: mbsnrtowcs is a GNU extension
-+
++
+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
+ // its fourth parameter (it wouldn't with NULL as first parameter).
-+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
+ * __max));
+ while (__from < __end && __max)
+ {
@@ -696,7 +708,7 @@
+ }
+ if (!__from)
+ __from = __from_chunk_end;
-+
++
+ __ret += __from - __tmp_from;
+ __max -= __conv;
+
@@ -714,12 +726,14 @@
+ __uselocale(__old);
+#endif
+
-+ return __ret;
++ return __ret;
+ }
+#endif
+}
---- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-08-19 01:38:05.000000000 -0700
@@ -0,0 +1,80 @@
+// std::collate implementation details, GNU version -*- C++ -*-
+
@@ -771,29 +785,29 @@
+ // These are basically extensions to char_traits, and perhaps should
+ // be put there instead of here.
+ template<>
-+ int
++ int
+ collate<char>::_M_compare(const char* __one, const char* __two) const
-+ {
++ {
+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
+ }
-+
++
+ template<>
+ size_t
-+ collate<char>::_M_transform(char* __to, const char* __from,
-+ size_t __n) const
++ collate<char>::_M_transform(char* __to, const char* __from,
++ size_t __n) const
+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
-+ int
-+ collate<wchar_t>::_M_compare(const wchar_t* __one,
++ int
++ collate<wchar_t>::_M_compare(const wchar_t* __one,
+ const wchar_t* __two) const
+ {
+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
+ }
-+
++
+ template<>
+ size_t
+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
@@ -801,8 +815,10 @@
+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
+#endif
+}
---- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-08-19 01:38:05.000000000 -0700
@@ -0,0 +1,300 @@
+// std::ctype implementation details, GNU version -*- C++ -*-
+
@@ -857,12 +873,12 @@
+ // various /config/os/* files.
+ template<>
+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+ : ctype<char>(0, false, __refs)
-+ {
++ : ctype<char>(0, false, __refs)
++ {
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
+#ifdef __UCLIBC_HAS_XLOCALE__
+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
@@ -871,7 +887,7 @@
+ }
+ }
+
-+#ifdef _GLIBCXX_USE_WCHAR_T
++#ifdef _GLIBCXX_USE_WCHAR_T
+ ctype<wchar_t>::__wmask_type
+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
+ {
@@ -916,7 +932,7 @@
+ }
+ return __ret;
+ }
-+
++
+ wchar_t
+ ctype<wchar_t>::do_toupper(wchar_t __c) const
+ { return __towupper_l(__c, _M_c_locale_ctype); }
@@ -931,11 +947,11 @@
+ }
+ return __hi;
+ }
-+
++
+ wchar_t
+ ctype<wchar_t>::do_tolower(wchar_t __c) const
+ { return __towlower_l(__c, _M_c_locale_ctype); }
-+
++
+ const wchar_t*
+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
+ {
@@ -950,11 +966,11 @@
+ bool
+ ctype<wchar_t>::
+ do_is(mask __m, wchar_t __c) const
-+ {
++ {
+ // Highest bitmask in ctype_base == 10, but extra in "C"
+ // library for blank.
+ bool __ret = false;
-+ const size_t __bitmasksize = 11;
++ 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))
@@ -962,10 +978,10 @@
+ __ret = true;
+ break;
+ }
-+ return __ret;
++ return __ret;
+ }
-+
-+ const wchar_t*
++
++ const wchar_t*
+ ctype<wchar_t>::
+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
+ {
@@ -973,7 +989,7 @@
+ {
+ // Highest bitmask in ctype_base == 10, but extra in "C"
+ // library for blank.
-+ const size_t __bitmasksize = 11;
++ const size_t __bitmasksize = 11;
+ mask __m = 0;
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
@@ -982,8 +998,8 @@
+ }
+ return __hi;
+ }
-+
-+ const wchar_t*
++
++ const wchar_t*
+ ctype<wchar_t>::
+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
+ {
@@ -1006,7 +1022,7 @@
+ do_widen(char __c) const
+ { return _M_widen[static_cast<unsigned char>(__c)]; }
+
-+ const char*
++ const char*
+ ctype<wchar_t>::
+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
+ {
@@ -1032,12 +1048,12 @@
+#ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+#endif
-+ return (__c == EOF ? __dfault : static_cast<char>(__c));
++ return (__c == EOF ? __dfault : static_cast<char>(__c));
+ }
+
+ const wchar_t*
+ ctype<wchar_t>::
-+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
+ char* __dest) const
+ {
+#ifdef __UCLIBC_HAS_XLOCALE__
@@ -1094,7 +1110,7 @@
+ _M_widen[__j] = btowc(__j);
+
+ for (size_t __k = 0; __k <= 11; ++__k)
-+ {
++ {
+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
+ }
@@ -1104,8 +1120,10 @@
+ }
+#endif // _GLIBCXX_USE_WCHAR_T
+}
---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-08-19 01:38:05.000000000 -0700
@@ -0,0 +1,100 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
@@ -1207,8 +1225,10 @@
+ }
+#endif
+}
---- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-08-19 01:38:05.000000000 -0700
@@ -0,0 +1,118 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
@@ -1262,13 +1282,13 @@
+ // Non-virtual member functions.
+ template<typename _CharT>
+ messages<_CharT>::messages(size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
+ _M_name_messages(_S_get_c_name())
+ { }
+
+ template<typename _CharT>
-+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
-+ size_t __refs)
++ 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)
+ {
@@ -1278,28 +1298,28 @@
+ }
+
+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
++ typename messages<_CharT>::catalog
++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char* __dir) const
-+ {
++ {
+ __bindtextdomain(__s.c_str(), __dir);
-+ return this->do_open(__s, __loc);
++ return this->do_open(__s, __loc);
+ }
+
+ // Virtual member functions.
+ template<typename _CharT>
+ messages<_CharT>::~messages()
-+ {
++ {
+ if (_M_name_messages != _S_get_c_name())
+ delete [] _M_name_messages;
-+ _S_destroy_c_locale(_M_c_locale_messages);
++ _S_destroy_c_locale(_M_c_locale_messages);
+ }
+
+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::do_open(const basic_string<char>& __s,
++ typename messages<_CharT>::catalog
++ messages<_CharT>::do_open(const basic_string<char>& __s,
+ const locale&) const
-+ {
++ {
+ // No error checking is done, assume the catalog exists and can
+ // be used.
+ __textdomain(__s.c_str());
@@ -1307,15 +1327,15 @@
+ }
+
+ template<typename _CharT>
-+ void
-+ messages<_CharT>::do_close(catalog) const
++ void
++ messages<_CharT>::do_close(catalog) const
+ { }
+
+ // messages_byname
+ template<typename _CharT>
+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+ : messages<_CharT>(__refs)
-+ {
++ : messages<_CharT>(__refs)
++ {
+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
+ delete [] this->_M_name_messages;
+ char* __tmp = new char[std::strlen(__s) + 1];
@@ -1325,11 +1345,13 @@
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
++ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
---- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+Index: gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-08-19 01:38:05.000000000 -0700
@@ -0,0 +1,692 @@
+// std::moneypunct implementation details, GNU version -*- C++ -*-
+
@@ -1386,7 +1408,7 @@
+ // space none symbol sign value
+ money_base::pattern
+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+ {
++ {
+ pattern __ret;
+
+ // This insanely complicated routine attempts to construct a valid
@@ -1394,7 +1416,7 @@
+
+ // if (__precedes) symbol -> value
+ // else value -> symbol
-+
++
+ // if (__space) space
+ // else none
+
@@ -1479,7 +1501,7 @@
+ if (__precedes)
+ {
+ __ret.field[0] = sign;
-+ __ret.field[1] = symbol;
++ __ret.field[1] = symbol;
+ if (__space)
+ {
+ __ret.field[2] = space;
@@ -1487,7 +1509,7 @@
+ }
+ else
+ {
-+ __ret.field[2] = value;
++ __ret.field[2] = value;
+ __ret.field[3] = none;
+ }
+ }
@@ -1548,9 +1570,9 @@
+ return __ret;
+ }
+
-+ template<>
++ template<>
+ void
-+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
+ const char*)
+ {
+ if (!_M_data)
@@ -1579,9 +1601,9 @@
+ else
+ {
+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
+ __cloc));
+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
@@ -1592,30 +1614,30 @@
+ if (!__nposn)
+ _M_data->_M_negative_sign = "()";
+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
+ __cloc);
+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
+
+ // _Intl == true
+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
+ __cloc));
+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
+ __pposn);
+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
+ __nposn);
+ }
+ }
+
-+ template<>
++ template<>