]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
fix configure for arm cross compilation
authorSebastian Pop <s.pop@samsung.com>
Fri, 21 Dec 2018 19:46:46 +0000 (13:46 -0600)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 15 Jan 2019 10:04:33 +0000 (11:04 +0100)
configure used to end with ARCH=x86_64 even when using a cross compiler
targeting arm. When using a compiler targeting aarch64 there was no problem
detecting a correct ARCH.

configure

index c1a15e800fe1a3735b1b0861cd3f51c16a602218..8a8143b72bdb878338b4d99d5a3893a2f6635949 100755 (executable)
--- a/configure
+++ b/configure
@@ -282,6 +282,11 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
         ARCH=$GCC_ARCH
       fi ;;
     arm | armeb)
+      if test $native -eq 0; then
+        ARCH=arm
+      else
+        ARCH=native
+      fi
       if test "${uname}" = "eabi"; then
         # No ACLE support
         uname=arm
@@ -293,8 +298,6 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
       if test $buildacle -eq 1; then
         if test $native -eq 0; then
           ARCH=armv8-a+crc
-        else
-          ARCH=native
         fi
       fi ;;
     armv8l)