From 07b34d934ef2227fd5bbc840d405d909e45243ac Mon Sep 17 00:00:00 2001
From: Paul Olav Tvete <paul.tvete@digia.com>
Date: Thu, 23 May 2013 13:02:06 +0200
Subject: [PATCH] Android: detect Linux 64 bit host architecture

This is the easy fix: looking at what is supported by the NDK. If people
have weird setups, then they have to specify -android-ndk-host. We do
actually detect the host architecture later, but using that would be
a much bigger (and riskier) change.

Task-number: QTBUG-31275

Change-Id: I18db878031baa2e1ee2fa4beff364d58d8bd3c7a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
---
 configure | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 8427e323c65..e633a780bdc 100755
--- a/configure
+++ b/configure
@@ -2664,16 +2664,13 @@ esac
 if [ "$XPLATFORM_ANDROID" = "yes" ]; then
     if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
         case $PLATFORM in
-        linux-*-64)
-            if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then
-                CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64
-            else
+        linux-*)
+            if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86" ]; then
                 CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86
+            elif [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then
+                CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64
             fi
             ;;
-        linux-*)
-            CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86
-            ;;
         macx-*)
             CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86
             if [ ! -z "$NATIVE_64_ARCH" ] && [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/darwin-x86_64" ]; then
-- 
GitLab