patches/gcc/4.2.4/140-uclibc-locale-wchar_fix.patch
author Remy Bohmer <linux@bohmer.net>
Thu May 27 23:18:19 2010 +0200 (2010-05-27)
changeset 2060 51e4597b07fc
parent 687 b2b6b1d46aa1
permissions -rw-r--r--
scripts: add option to strip all toolchain executables

To reduce filesizes of the toolchain and even improve build times
of projects to be build with this toolchain it is usefull to strip
the delivered toolchain executables. Since it is not likely that we
will debug the toolchain executables itself we do not need the
debug information inside the executables itself.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
yann@687
     1
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
yann@687
     2
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2007-08-03 20:30:53.000000000 +0200
yann@687
     3
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2007-08-03 20:31:24.000000000 +0200
yann@687
     4
@@ -401,7 +401,7 @@
yann@687
     5
 # ifdef __UCLIBC_HAS_XLOCALE__
yann@687
     6
 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
yann@687
     7
 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
yann@687
     8
-# else
yann@687
     9
+# elif defined __UCLIBC_HAS_LOCALE__
yann@687
    10
 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
yann@687
    11
 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
yann@687
    12
 # endif
yann@687
    13
@@ -556,7 +556,7 @@
yann@687
    14
 # ifdef __UCLIBC_HAS_XLOCALE__
yann@687
    15
 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
yann@687
    16
 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
yann@687
    17
-# else
yann@687
    18
+# elif defined __UCLIBC_HAS_LOCALE__
yann@687
    19
 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
yann@687
    20
 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
yann@687
    21
 # endif
yann@687
    22
diff -durN gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
yann@687
    23
--- gcc-4.2.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2007-08-03 20:30:53.000000000 +0200
yann@687
    24
+++ gcc-4.2.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2007-08-03 20:31:24.000000000 +0200
yann@687
    25
@@ -127,12 +127,25 @@
yann@687
    26
 	{
yann@687
    27
 	  // Named locale.
yann@687
    28
 	  // NB: In the GNU model wchar_t is always 32 bit wide.
yann@687
    29
+#ifdef __UCLIBC_MJN3_ONLY__
yann@687
    30
+#warning fix this... should be numeric
yann@687
    31
+#endif
yann@687
    32
+#ifdef __UCLIBC__
yann@687
    33
+# ifdef __UCLIBC_HAS_XLOCALE__
yann@687
    34
+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
yann@687
    35
+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
yann@687
    36
+# elif defined __UCLIBC_HAS_LOCALE__
yann@687
    37
+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
yann@687
    38
+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
yann@687
    39
+# endif
yann@687
    40
+#else
yann@687
    41
 	  union { char *__s; wchar_t __w; } __u;
yann@687
    42
 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
yann@687
    43
 	  _M_data->_M_decimal_point = __u.__w;
yann@687
    44
 
yann@687
    45
 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
yann@687
    46
 	  _M_data->_M_thousands_sep = __u.__w;
yann@687
    47
+#endif
yann@687
    48
 
yann@687
    49
 	  if (_M_data->_M_thousands_sep == L'\0')
yann@687
    50
 	    _M_data->_M_grouping = "";