summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoko@ubuntu.com <doko@ubuntu.com>2016-09-01 20:05:20 (GMT)
committerdoko@ubuntu.com <doko@ubuntu.com>2016-09-01 20:05:20 (GMT)
commit5c38cb2316aabf42c60e75f5eb6637c6f59c45cf (patch)
tree0ac4bc3f4497e95df1968d1d6ad243b12f5ce5db
parentaf0628e045c024fec27432afd1f20c0d08095197 (diff)
downloadcpython-5c38cb2316aabf42c60e75f5eb6637c6f59c45cf.zip
cpython-5c38cb2316aabf42c60e75f5eb6637c6f59c45cf.tar.gz
cpython-5c38cb2316aabf42c60e75f5eb6637c6f59c45cf.tar.bz2
- Issue #27917: Set platform triplets for Android builds.
-rw-r--r--Misc/NEWS2
-rwxr-xr-xconfigure26
-rw-r--r--configure.ac26
3 files changed, 52 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 4f66ee2..85772c6 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -127,6 +127,8 @@ Tests
Build
-----
+- Issue #27917: Set platform triplets for Android builds.
+
- Issue #25825: Update references to the $(LIBPL) installation path on AIX.
This path was changed in 3.2a4.
diff --git a/configure b/configure
index 22eb638..01dd253 100755
--- a/configure
+++ b/configure
@@ -5279,7 +5279,31 @@ cat >> conftest.c <<EOF
#undef powerpc
#undef sparc
#undef unix
-#if defined(__linux__)
+#if defined(__ANDROID__)
+# if defined(__x86_64__) && defined(__LP64__)
+ x86_64-linux-android
+# elif defined(__i386__)
+ i686-linux-android
+# elif defined(__aarch64__) && defined(__AARCH64EL__)
+# if defined(__ILP32__)
+ aarch64_ilp32-linux-android
+# else
+ aarch64-linux-android
+# endif
+# elif defined(__ARM_EABI__) && defined(__ARMEL__)
+ arm-linux-androideabi
+# elif defined(__mips_hard_float) && defined(_MIPSEL)
+# if _MIPS_SIM == _ABIO32
+ mipsel-linux-android
+# elif _MIPS_SIM == _ABI64
+ mips64el-linux-android
+# else
+# error unknown platform triplet
+# endif
+# else
+# error unknown platform triplet
+# endif
+#elif defined(__linux__)
# if defined(__x86_64__) && defined(__LP64__)
x86_64-linux-gnu
# elif defined(__x86_64__) && defined(__ILP32__)
diff --git a/configure.ac b/configure.ac
index f68069d..56fd29c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -768,7 +768,31 @@ cat >> conftest.c <<EOF
#undef powerpc
#undef sparc
#undef unix
-#if defined(__linux__)
+#if defined(__ANDROID__)
+# if defined(__x86_64__) && defined(__LP64__)
+ x86_64-linux-android
+# elif defined(__i386__)
+ i686-linux-android
+# elif defined(__aarch64__) && defined(__AARCH64EL__)
+# if defined(__ILP32__)
+ aarch64_ilp32-linux-android
+# else
+ aarch64-linux-android
+# endif
+# elif defined(__ARM_EABI__) && defined(__ARMEL__)
+ arm-linux-androideabi
+# elif defined(__mips_hard_float) && defined(_MIPSEL)
+# if _MIPS_SIM == _ABIO32
+ mipsel-linux-android
+# elif _MIPS_SIM == _ABI64
+ mips64el-linux-android
+# else
+# error unknown platform triplet
+# endif
+# else
+# error unknown platform triplet
+# endif
+#elif defined(__linux__)
# if defined(__x86_64__) && defined(__LP64__)
x86_64-linux-gnu
# elif defined(__x86_64__) && defined(__ILP32__)