diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-04-19 21:27:09 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-28 10:44:21 +0100 |
commit | 3669de7f96100a5d4fbfc9b4e2ebc16851ba98ea (patch) | |
tree | 66743557d4203b019988970a6fa3ac603c06c991 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-uclibc-locale-ctype_touplow_t.patch | |
parent | 07a6bec75c59fec06d0947ada708482900bf067a (diff) | |
download | poky-3669de7f96100a5d4fbfc9b4e2ebc16851ba98ea.tar.gz |
gcc: Add recipes for 4.6.0
This is initial set of patches for testing them out
The patches need documentation is pending
Some patches especially uclibc related are not
needed they must be dropped.
(From OE-Core rev: 26858099bc104efc3b3d15d9298018285c551b9a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-uclibc-locale-ctype_touplow_t.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-uclibc-locale-ctype_touplow_t.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-uclibc-locale-ctype_touplow_t.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-uclibc-locale-ctype_touplow_t.patch new file mode 100644 index 0000000000..8b71e313d9 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-uclibc-locale-ctype_touplow_t.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | Index: gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.h | ||
2 | =================================================================== | ||
3 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/generic/c_locale.h | ||
4 | +++ gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.h | ||
5 | @@ -41,13 +41,22 @@ | ||
6 | |||
7 | #include <clocale> | ||
8 | |||
9 | +#ifdef __UCLIBC__ | ||
10 | +#include <features.h> | ||
11 | +#include <ctype.h> | ||
12 | +#endif | ||
13 | + | ||
14 | #define _GLIBCXX_NUM_CATEGORIES 0 | ||
15 | |||
16 | namespace std _GLIBCXX_VISIBILITY(default) | ||
17 | { | ||
18 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
19 | |||
20 | +#ifdef __UCLIBC__ | ||
21 | + typedef __ctype_touplow_t* __c_locale; | ||
22 | +#else | ||
23 | typedef int* __c_locale; | ||
24 | +#endif | ||
25 | |||
26 | // Convert numeric value of type double and long double to string and | ||
27 | // return length of string. If vsnprintf is available use it, otherwise | ||
28 | Index: gcc-4.6.0/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
29 | =================================================================== | ||
30 | --- gcc-4.6.0.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
31 | +++ gcc-4.6.0/libstdc++-v3/config/os/gnu-linux/ctype_base.h | ||
32 | @@ -34,6 +34,11 @@ | ||
33 | |||
34 | // Information as gleaned from /usr/include/ctype.h | ||
35 | |||
36 | +#ifdef __UCLIBC__ | ||
37 | +#include <features.h> | ||
38 | +#include <ctype.h> | ||
39 | +#endif | ||
40 | + | ||
41 | namespace std _GLIBCXX_VISIBILITY(default) | ||
42 | { | ||
43 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
44 | @@ -42,7 +47,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION | ||
45 | struct ctype_base | ||
46 | { | ||
47 | // Non-standard typedefs. | ||
48 | +#ifdef __UCLIBC__ | ||
49 | + typedef const __ctype_touplow_t* __to_type; | ||
50 | +#else | ||
51 | typedef const int* __to_type; | ||
52 | +#endif | ||
53 | |||
54 | // NB: Offsets into ctype<char>::_M_table force a particular size | ||
55 | // on the mask type. Because of this, we don't use an enum. | ||
56 | Index: gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.cc | ||
57 | =================================================================== | ||
58 | --- gcc-4.6.0.orig/libstdc++-v3/config/locale/generic/c_locale.cc | ||
59 | +++ gcc-4.6.0/libstdc++-v3/config/locale/generic/c_locale.cc | ||
60 | @@ -264,5 +264,10 @@ _GLIBCXX_END_NAMESPACE_VERSION | ||
61 | #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT | ||
62 | #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ | ||
63 | extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) | ||
64 | +#ifdef __UCLIBC__ | ||
65 | +// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int* | ||
66 | +_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs); | ||
67 | +#else | ||
68 | _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); | ||
69 | +#endif | ||
70 | #endif // _GLIBCXX_LONG_DOUBLE_COMPAT | ||