diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/configure.in b/configure.in index 6d9699d905a9..a360fffc8fcb 100644 --- a/configure.in +++ b/configure.in @@ -120,12 +120,6 @@ AC_ARG_WITH(android-sdk, [Specify location of the Android SDK. Mandatory when building for Android.]), ,) -AC_ARG_WITH(android-arch, - AS_HELP_STRING([--with-android-arch], - [Specify the Android target architecture - default is arm, or try x86]),, - [with_android_arch=arm]) - -ANDROID_ARCH= ANDROID_NDK_HOME= if test -n "$with_android_ndk"; then ANDROID_NDK_HOME=$with_android_ndk @@ -140,22 +134,22 @@ if test -n "$with_android_ndk"; then # possiblity to use the gold linker, which should bring a nice speedup to # linking especially our libmerged. Work to support that in progress. Until # that is done, please use no newer NDK than r8. - if test "$with_android_arch" = "arm"; then - ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$with_android_arch-linux*/prebuilt/*/bin` + if test $host_cpu = arm; then + ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-linux*/prebuilt/*/bin` android_gcc_prefix=arm-linux-androideabi else - ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$with_android_arch-*/prebuilt/*/bin` + ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/$host_cpu-*/prebuilt/*/bin` android_gcc_prefix=i686-android-linux fi - test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-$with_android_arch + test -z "$SYSBASE" && export SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-$host_cpu test -z "$AR" && AR=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ar test -z "$NM" && NM=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-nm test -z "$OBJDUMP" && OBJDUMP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-objdump test -z "$RANLIB" && RANLIB=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-ranlib test -z "$STRIP" && STRIP=$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-strip - if test "$with_android_arch" = "arm"; then + if test $host_cpu = arm; then ANDROIDCFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wl,--fix-cortex-a8 --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a" ANDROIDCXXFLAGS="$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include" else # x86 @@ -164,9 +158,7 @@ if test -n "$with_android_ndk"; then fi test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-gcc $ANDROIDCFLAGS" test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/$android_gcc_prefix-g++ $ANDROIDCXXFLAGS" - ANDROID_ARCH=$with_android_arch fi -AC_SUBST(ANDROID_ARCH) AC_SUBST(ANDROID_NDK_HOME) dnl =================================================================== |