summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6/gcc-uclibc-locale-ctype_touplow_t.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-06-17 17:11:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-23 11:50:07 +0100
commit0faa5f72999fea82fadda8bab70abea2303216c7 (patch)
tree05a8c18d2f67d883f94d2bd6f060ab0f4ac7f156 /meta/recipes-devtools/gcc/gcc-4.6/gcc-uclibc-locale-ctype_touplow_t.patch
parentc2007ba4cdb64fa9e308d3dae395c03ef4cc9161 (diff)
downloadpoky-0faa5f72999fea82fadda8bab70abea2303216c7.tar.gz
gcc-4.6: Switch to using svn SRC_URI for recipe
We call the recipes 4.6 Remove the backport patches (From OE-Core rev: 68b545f4ff719f2b6e57d68b002dc9845c7a14ae) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6/gcc-uclibc-locale-ctype_touplow_t.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6/gcc-uclibc-locale-ctype_touplow_t.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/gcc-uclibc-locale-ctype_touplow_t.patch b/meta/recipes-devtools/gcc/gcc-4.6/gcc-uclibc-locale-ctype_touplow_t.patch
new file mode 100644
index 0000000000..1648b3b98c
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6/gcc-uclibc-locale-ctype_touplow_t.patch
@@ -0,0 +1,72 @@
1Upstream-Status: Pending
2
3Index: gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.h
4===================================================================
5--- gcc-4.6.0.orig/libstdc++-v3/config/locale/generic/c_locale.h
6+++ gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.h
7@@ -41,13 +41,22 @@
8
9 #include <clocale>
10
11+#ifdef __UCLIBC__
12+#include <features.h>
13+#include <ctype.h>
14+#endif
15+
16 #define _GLIBCXX_NUM_CATEGORIES 0
17
18 namespace std _GLIBCXX_VISIBILITY(default)
19 {
20 _GLIBCXX_BEGIN_NAMESPACE_VERSION
21
22+#ifdef __UCLIBC__
23+ typedef __ctype_touplow_t* __c_locale;
24+#else
25 typedef int* __c_locale;
26+#endif
27
28 // Convert numeric value of type double and long double to string and
29 // return length of string. If vsnprintf is available use it, otherwise
30Index: gcc-4.6.0/libstdc++-v3/config/os/gnu-linux/ctype_base.h
31===================================================================
32--- gcc-4.6.0.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h
33+++ gcc-4.6.0/libstdc++-v3/config/os/gnu-linux/ctype_base.h
34@@ -34,6 +34,11 @@
35
36 // Information as gleaned from /usr/include/ctype.h
37
38+#ifdef __UCLIBC__
39+#include <features.h>
40+#include <ctype.h>
41+#endif
42+
43 namespace std _GLIBCXX_VISIBILITY(default)
44 {
45 _GLIBCXX_BEGIN_NAMESPACE_VERSION
46@@ -42,7 +47,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
47 struct ctype_base
48 {
49 // Non-standard typedefs.
50+#ifdef __UCLIBC__
51+ typedef const __ctype_touplow_t* __to_type;
52+#else
53 typedef const int* __to_type;
54+#endif
55
56 // NB: Offsets into ctype<char>::_M_table force a particular size
57 // on the mask type. Because of this, we don't use an enum.
58Index: gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.cc
59===================================================================
60--- gcc-4.6.0.orig/libstdc++-v3/config/locale/generic/c_locale.cc
61+++ gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.cc
62@@ -264,5 +264,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
63 #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
64 #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
65 extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
66+#ifdef __UCLIBC__
67+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
68+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
69+#else
70 _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
71+#endif
72 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT