diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-02-20 21:53:51 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-02-20 21:54:20 -0600 |
commit | 6d7203982c05651f748825deb393eb6480c03e32 (patch) | |
tree | f771531d5103dede68a6c9f52b349d8ba04cbb09 /system/gcc/add-classic_table-support.patch | |
parent | 866f81aaa5e438537e6a4b30c1f0fcecc713a1a2 (diff) | |
download | packages-6d7203982c05651f748825deb393eb6480c03e32.tar.gz packages-6d7203982c05651f748825deb393eb6480c03e32.tar.bz2 packages-6d7203982c05651f748825deb393eb6480c03e32.tar.xz packages-6d7203982c05651f748825deb393eb6480c03e32.zip |
system/gcc: maintain our own toolchain
Diffstat (limited to 'system/gcc/add-classic_table-support.patch')
-rw-r--r-- | system/gcc/add-classic_table-support.patch | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/system/gcc/add-classic_table-support.patch b/system/gcc/add-classic_table-support.patch new file mode 100644 index 000000000..0f5e0f8e3 --- /dev/null +++ b/system/gcc/add-classic_table-support.patch @@ -0,0 +1,151 @@ +--- gcc-6.4.0/libstdc++-v3/config/os/generic/ctype_base.h.old 2016-01-04 08:30:50.652828000 -0600 ++++ gcc-6.4.0/libstdc++-v3/config/os/generic/ctype_base.h 2017-10-16 07:51:26.226276759 -0500 +@@ -40,19 +40,27 @@ + + // NB: Offsets into ctype<char>::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. +- typedef unsigned int mask; +- static const mask upper = 1 << 0; +- static const mask lower = 1 << 1; +- static const mask alpha = 1 << 2; +- static const mask digit = 1 << 3; +- static const mask xdigit = 1 << 4; +- static const mask space = 1 << 5; +- static const mask print = 1 << 6; +- static const mask graph = (1 << 2) | (1 << 3) | (1 << 9); // alnum|punct +- static const mask cntrl = 1 << 8; +- static const mask punct = 1 << 9; +- static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit +- static const mask blank = 1 << 10; ++ typedef unsigned short int mask; ++/* horrible ugly code from glibc */ ++#ifndef _ISbit ++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ++# define _ISbit(i) (1 << (i)) ++# else ++# define _ISbit(i) (i < 8 ? (1 << i << 8) : (1 << i >> 8)) ++# endif ++#endif ++ static const mask upper = _ISbit(0); ++ static const mask lower = _ISbit(1); ++ static const mask alpha = _ISbit(2); ++ static const mask digit = _ISbit(3); ++ static const mask xdigit = _ISbit(4); ++ static const mask space = _ISbit(5); ++ static const mask print = _ISbit(6); ++ static const mask graph = _ISbit(7); ++ static const mask cntrl = _ISbit(9); ++ static const mask punct = _ISbit(10); ++ static const mask alnum = _ISbit(11); ++ static const mask blank = _ISbit(8); + }; + + _GLIBCXX_END_NAMESPACE_VERSION +--- gcc-6.4.0/libstdc++-v3/config/os/generic/ctype_configure_char.cc.old 2016-01-04 08:30:50.652828000 -0600 ++++ gcc-6.4.0/libstdc++-v3/config/os/generic/ctype_configure_char.cc 2017-10-16 08:37:57.986260218 -0500 +@@ -40,7 +40,104 @@ + + const ctype_base::mask* + ctype<char>::classic_table() throw() +- { return 0; } ++ { ++ static ctype_base::mask mask[256] = { ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl | print | space, cntrl, cntrl, cntrl, cntrl | print, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ print | space | blank, ++ print | punct | graph, print | punct | graph, ++ print | punct | graph, print | punct | graph, ++ print | punct | graph, print | punct | graph, ++ print | punct | graph, print | punct | graph, ++ print | punct | graph, print | punct | graph, ++ print | punct | graph, print | punct | graph, ++ print | punct | graph, print | punct | graph, ++ print | punct | graph, ++ print | graph | alnum | digit | xdigit, print | graph | alnum | digit | xdigit, ++ print | graph | alnum | digit | xdigit, print | graph | alnum | digit | xdigit, ++ print | graph | alnum | digit | xdigit, print | graph | alnum | digit | xdigit, ++ print | graph | alnum | digit | xdigit, print | graph | alnum | digit | xdigit, ++ print | graph | alnum | digit | xdigit, print | graph | alnum | digit | xdigit, ++ print | punct | graph, print | punct | graph, ++ print | graph, print | graph, print | graph, ++ print | punct | graph, print | graph, ++ print | graph | alnum | xdigit | alpha | upper, ++ print | graph | alnum | xdigit | alpha | upper, ++ print | graph | alnum | xdigit | alpha | upper, ++ print | graph | alnum | xdigit | alpha | upper, ++ print | graph | alnum | xdigit | alpha | upper, ++ print | graph | alnum | xdigit | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph | alnum | alpha | upper, ++ print | graph, print | graph, print | graph, ++ print | graph, print | graph, print | graph, ++ print | graph | alnum | xdigit | alpha | lower, ++ print | graph | alnum | xdigit | alpha | lower, ++ print | graph | alnum | xdigit | alpha | lower, ++ print | graph | alnum | xdigit | alpha | lower, ++ print | graph | alnum | xdigit | alpha | lower, ++ print | graph | alnum | xdigit | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph | alnum | alpha | lower, ++ print | graph, print | graph, print | graph, print | graph, ++ print, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, ++ cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl, cntrl ++ }; ++ return mask; ++ } + + ctype<char>::ctype(__c_locale, const mask* __table, bool __del, + size_t __refs) |