From 40859a80da32ed0974580871e2053c37c7817a3a Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 13 Sep 2017 17:00:52 -0400 Subject: [PATCH] Improve detection of ANDROID_NDK_ROOT We were searching for R10 NDK's, but Android is at R15 in 2017 --- TestScripts/setenv-android.sh | 8 ++++---- setenv-android.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TestScripts/setenv-android.sh b/TestScripts/setenv-android.sh index af59640a..b14d605a 100755 --- a/TestScripts/setenv-android.sh +++ b/TestScripts/setenv-android.sh @@ -71,13 +71,13 @@ fi # like ANDROID_NDK_ROOT=/opt/android-ndk-r10e or ANDROID_NDK_ROOT=/usr/local/android-ndk-r10e. if [ -z "${ANDROID_NDK_ROOT-}" ]; then - ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk-r10* 2>/dev/null | tail -1) + ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1) if [ -z "$ANDROID_NDK_ROOT" ]; then - ANDROID_NDK_ROOT=$(find /usr/local -maxdepth 1 -type d -name android-ndk-r10* 2>/dev/null | tail -1) + ANDROID_NDK_ROOT=$(find /usr/local -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1) fi if [ -z "$ANDROID_NDK_ROOT" ]; then - ANDROID_NDK_ROOT=$(find $HOME -maxdepth 1 -type d -name android-ndk-r10* 2>/dev/null | tail -1) + ANDROID_NDK_ROOT=$(find $HOME -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1) fi if [ -d "$HOME/Library/Android/sdk/ndk-bundle" ]; then ANDROID_NDK_ROOT="$HOME/Library/Android/sdk/ndk-bundle" @@ -154,7 +154,7 @@ case "$THE_ARCH" in TOOLCHAIN_NAME="i686-linux-android" AOSP_ABI="x86" AOSP_ARCH="arch-x86" - AOSP_FLAGS="-march=i686 -mtune=intel -mssse3 -mfpmath=sse -funwind-tables -fexceptions -frtti" + AOSP_FLAGS="-mtune=intel -mssse3 -mfpmath=sse -funwind-tables -fexceptions -frtti" ;; x86_64|x64) TOOLCHAIN_ARCH="x86_64" diff --git a/setenv-android.sh b/setenv-android.sh index af59640a..b14d605a 100755 --- a/setenv-android.sh +++ b/setenv-android.sh @@ -71,13 +71,13 @@ fi # like ANDROID_NDK_ROOT=/opt/android-ndk-r10e or ANDROID_NDK_ROOT=/usr/local/android-ndk-r10e. if [ -z "${ANDROID_NDK_ROOT-}" ]; then - ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk-r10* 2>/dev/null | tail -1) + ANDROID_NDK_ROOT=$(find /opt -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1) if [ -z "$ANDROID_NDK_ROOT" ]; then - ANDROID_NDK_ROOT=$(find /usr/local -maxdepth 1 -type d -name android-ndk-r10* 2>/dev/null | tail -1) + ANDROID_NDK_ROOT=$(find /usr/local -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1) fi if [ -z "$ANDROID_NDK_ROOT" ]; then - ANDROID_NDK_ROOT=$(find $HOME -maxdepth 1 -type d -name android-ndk-r10* 2>/dev/null | tail -1) + ANDROID_NDK_ROOT=$(find $HOME -maxdepth 1 -type d -name android-ndk* 2>/dev/null | tail -1) fi if [ -d "$HOME/Library/Android/sdk/ndk-bundle" ]; then ANDROID_NDK_ROOT="$HOME/Library/Android/sdk/ndk-bundle" @@ -154,7 +154,7 @@ case "$THE_ARCH" in TOOLCHAIN_NAME="i686-linux-android" AOSP_ABI="x86" AOSP_ARCH="arch-x86" - AOSP_FLAGS="-march=i686 -mtune=intel -mssse3 -mfpmath=sse -funwind-tables -fexceptions -frtti" + AOSP_FLAGS="-mtune=intel -mssse3 -mfpmath=sse -funwind-tables -fexceptions -frtti" ;; x86_64|x64) TOOLCHAIN_ARCH="x86_64"