Add sample Android config, gcc 6.3 patches

This commit is contained in:
hyc 2017-04-26 09:23:07 +01:00 committed by Alexey Neyman
parent 9062810a11
commit a776367937
5 changed files with 17660 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,58 @@
commit d38d37bdfe24b7ce1bdcb55642fb6b904718e68f
Author: Howard Chu <hyc@symas.com>
Date: Tue Apr 25 19:02:18 2017 -0700
Fix ctype for newer NDK headers
diff --git a/libstdc++-v3/config/os/bionic/ctype_base.h b/libstdc++-v3/config/os/bionic/ctype_base.h
index 33978f3..c36e63c 100644
--- a/libstdc++-v3/config/os/bionic/ctype_base.h
+++ b/libstdc++-v3/config/os/bionic/ctype_base.h
@@ -28,6 +28,18 @@
// Information as gleaned from /usr/include/ctype.h
+// _CTYPE prefix was added in NDK r14 unified headers
+#ifndef _CTYPE_U
+#define _CTYPE_U _U
+#define _CTYPE_L _L
+#define _CTYPE_D _N
+#define _CTYPE_S _S
+#define _CTYPE_P _P
+#define _CTYPE_C _C
+#define _CTYPE_X _X
+#define _CTYPE_B _B
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -41,17 +53,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// 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 char mask;
- static const mask upper = _U;
- static const mask lower = _L;
- static const mask alpha = _U | _L;
- static const mask digit = _N;
- static const mask xdigit = _X | _N;
- static const mask space = _S;
- static const mask print = _P | _U | _L | _N | _B;
- static const mask graph = _P | _U | _L | _N;
- static const mask cntrl = _C;
- static const mask punct = _P;
- static const mask alnum = _U | _L | _N;
+ static const mask upper = _CTYPE_U;
+ static const mask lower = _CTYPE_L;
+ static const mask alpha = _CTYPE_U | _CTYPE_L;
+ static const mask digit = _CTYPE_D;
+ static const mask xdigit = _CTYPE_X | _CTYPE_D;
+ static const mask space = _CTYPE_S;
+ static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_D | _CTYPE_B;
+ static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_D;
+ static const mask cntrl = _CTYPE_C;
+ static const mask punct = _CTYPE_P;
+ static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_D;
#if __cplusplus >= 201103L
static const mask blank = space;
#endif

View File

@ -0,0 +1,19 @@
commit 6cd4ad106ef87a3c58b0c3478e78409b47000de0
Author: Howard Chu <hyc@symas.com>
Date: Tue Apr 25 20:17:03 2017 -0700
Fix, errno is volatile int
diff --git a/libstdc++-v3/src/filesystem/dir.cc b/libstdc++-v3/src/filesystem/dir.cc
index 6ff12d0..5bbd664 100644
--- a/libstdc++-v3/src/filesystem/dir.cc
+++ b/libstdc++-v3/src/filesystem/dir.cc
@@ -147,7 +147,7 @@ fs::_Dir::advance(error_code* ec, directory_options options)
int err = std::exchange(errno, 0);
const auto entp = readdir(dirp);
- std::swap(errno, err);
+ std::swap((int&)errno, err);
if (entp)
{

View File

@ -0,0 +1,10 @@
# CT_RM_RF_PREFIX_DIR is not set
CT_ARCH_arm=y
CT_ARCH_64=y
CT_ARCH_ARCH="armv8-a"
CT_STATIC_TOOLCHAIN=y
CT_KERNEL_linux=y
CT_LIBC_BIONIC_V_14b=y
CT_ANDROID_API_21=y
CT_CC_LANG_CXX=y
CT_GETTEXT=y

View File

@ -0,0 +1,3 @@
reporter_name="Howard Chu"
reporter_url="http://www.symas.com"
reporter_comment="Config to build cross-compiler for Android/bionic on ARM64"