summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-10-14 08:48:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-14 07:55:02 -0700
commit02b66069c561be3d5567712e5fc43b6340109ed1 (patch)
tree7804665cba85ae6a4d25a8110455a85e9d048031 /meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
parentfbf0a745375c293b92cd2584364d7a3c3731fe7e (diff)
downloadpoky-02b66069c561be3d5567712e5fc43b6340109ed1.tar.gz
gcc6: Upgrade to 6.4
Cherry-picked from oe-core master 7874fa86cb583fe6a178b95ead09430486197197 (From OE-Core rev: 4a9eee06a6d15a23f58bc981c83138964702b735) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
new file mode 100644
index 0000000000..df07febee2
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
@@ -0,0 +1,87 @@
1From ad5fd283fc7ef04f66c7fb003805364ea3bd34e9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 29 Mar 2013 08:40:12 +0400
4Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8Upstream-Status: Pending
9---
10 libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
11 libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++
12 libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++
13 3 files changed, 23 insertions(+)
14
15diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
16index ef6ce8f..4740636 100644
17--- a/libstdc++-v3/config/locale/generic/c_locale.cc
18+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
19@@ -273,5 +273,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
20 #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
21 #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
22 extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
23+#ifdef __UCLIBC__
24+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
25+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
26+#else
27 _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
28+#endif
29 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
30diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
31index 794471e..d65f955 100644
32--- a/libstdc++-v3/config/locale/generic/c_locale.h
33+++ b/libstdc++-v3/config/locale/generic/c_locale.h
34@@ -40,13 +40,22 @@
35
36 #include <clocale>
37
38+#ifdef __UCLIBC__
39+#include <features.h>
40+#include <ctype.h>
41+#endif
42+
43 #define _GLIBCXX_NUM_CATEGORIES 0
44
45 namespace std _GLIBCXX_VISIBILITY(default)
46 {
47 _GLIBCXX_BEGIN_NAMESPACE_VERSION
48
49+#ifdef __UCLIBC__
50+ typedef __ctype_touplow_t* __c_locale;
51+#else
52 typedef int* __c_locale;
53+#endif
54
55 // Convert numeric value of type double and long double to string and
56 // return length of string. If vsnprintf is available use it, otherwise
57diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
58index 591c793..55eb0e9 100644
59--- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
60+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
61@@ -33,6 +33,11 @@
62
63 // Information as gleaned from /usr/include/ctype.h
64
65+#ifdef __UCLIBC__
66+#include <features.h>
67+#include <ctype.h>
68+#endif
69+
70 namespace std _GLIBCXX_VISIBILITY(default)
71 {
72 _GLIBCXX_BEGIN_NAMESPACE_VERSION
73@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
74 struct ctype_base
75 {
76 // Non-standard typedefs.
77+#ifdef __UCLIBC__
78+ typedef const __ctype_touplow_t* __to_type;
79+#else
80 typedef const int* __to_type;
81+#endif
82
83 // NB: Offsets into ctype<char>::_M_table force a particular size
84 // on the mask type. Because of this, we don't use an enum.
85--
862.8.2
87