Fix AArch64/arm64 detection.
authorLisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Wed, 20 Aug 2014 20:52:49 +0000 (17:52 -0300)
committerMike Gabriel <sunweaver@debian.org>
Tue, 7 May 2019 07:14:21 +0000 (08:14 +0100)
The detection needs to go before arm, else the system will detect AArch64/arm64
as arm.

This patch comes from Wookey, he has agreed to put it under BSD or Expat
to allow it's inclusion in here:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#255>

Change-Id: Ic2171c03fca8bb871347940fa3a2bc467776f797

Gbp-Pq: Name aarch64_arm64_fix_arch_detection.patch

configure

index a9ba7c8ccbf11b29a2cb3769b0c331d56a92157f..eb88b72ad2e77abbd22a0b317183ab1feaa90bc8 100755 (executable)
--- a/configure
+++ b/configure
@@ -3241,17 +3241,17 @@ if [ -z "${CFG_HOST_ARCH}" ]; then
        fi
        CFG_HOST_ARCH=s390
        ;;
-    *:*:arm*)
+    *:*:aarch64*|*:*:arm64*)
         if [ "$OPT_VERBOSE" = "yes" ]; then
-            echo "    ARM (arm)"
+            echo "    AArch64 (aarch64)"
         fi
-        CFG_HOST_ARCH=arm
+        CFG_HOST_ARCH=aarch64
         ;;
-    *:*:aarch64*)
+    *:*:arm*)
         if [ "$OPT_VERBOSE" = "yes" ]; then
-            echo "    AArch64 (aarch64)"
+            echo "    ARM (arm)"
         fi
-        CFG_HOST_ARCH=aarch64
+        CFG_HOST_ARCH=arm
         ;;
     Linux:*:sparc*)
         if [ "$OPT_VERBOSE" = "yes" ]; then