diff options
author | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2017-01-04 20:53:53 (GMT) |
---|---|---|
committer | Xavier de Gaye <xdegaye@users.sourceforge.net> | 2017-01-04 20:53:53 (GMT) |
commit | 9971220e415ceafb82c915b6dc73fbd70842bbb7 (patch) | |
tree | a9d7d89e3f97f5ece28f8f35b28351bef6ad3025 /configure.ac | |
parent | 150257e31370ad5a6394ac31ecb8dad1370f4048 (diff) | |
parent | 2a352b667beb1401a4c5d9678cebd604ce1e3113 (diff) | |
download | cpython-9971220e415ceafb82c915b6dc73fbd70842bbb7.zip cpython-9971220e415ceafb82c915b6dc73fbd70842bbb7.tar.gz cpython-9971220e415ceafb82c915b6dc73fbd70842bbb7.tar.bz2 |
Issue #26851: Merge 3.6.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index aa98027..09b54a7 100644 --- a/configure.ac +++ b/configure.ac @@ -379,6 +379,9 @@ then # a lot of different things including 'define_xopen_source' # in the case statement below. case "$host" in + *-*-linux-android*) + ac_sys_system=Linux-android + ;; *-*-linux*) ac_sys_system=Linux ;; @@ -913,16 +916,25 @@ AC_MSG_CHECKING([for the Android API level]) cat >> conftest.c <<EOF #ifdef __ANDROID__ #include <android/api-level.h> -__ANDROID_API__ +android_api = __ANDROID_API__ +arm_arch = __ARM_ARCH #else #error not Android #endif EOF if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then - ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'` + ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out` + _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out` AC_MSG_RESULT([$ANDROID_API_LEVEL]) AC_DEFINE_UNQUOTED(ANDROID_API_LEVEL, $ANDROID_API_LEVEL, [The Android API level.]) + + AC_MSG_CHECKING([for the Android arm ABI]) + AC_MSG_RESULT([$_arm_arch]) + if test "$_arm_arch" = 7; then + BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16" + LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8" + fi else AC_MSG_RESULT([not Android]) fi @@ -2535,6 +2547,7 @@ then then CCSHARED="-fPIC"; else CCSHARED="+z"; fi;; + Linux-android*) ;; Linux*|GNU*) CCSHARED="-fPIC";; BSD/OS*/4*) CCSHARED="-fpic";; FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; @@ -2566,6 +2579,7 @@ then LINKFORSHARED="-Wl,-E -Wl,+s";; # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; + Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys Darwin/*) |