]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix build on aarch64 android.
authorBartosz Taudul <wolf@nereid.pl>
Tue, 17 Sep 2024 10:46:11 +0000 (12:46 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 18 Sep 2024 07:58:20 +0000 (09:58 +0200)
When building with CMake toolchain provided by NDK, the ARCH variable is
not "aarch64", but "aarch64-none-linux-android26" (or similar). The
strict string match check causes the WITH_ARMV6 option to be enabled in
such a case. In result, arch/arm/slide_hash_armv6.c is compiled, which
is not intended to be used on aarch64, and fails.

Relax the check and assume aarch64 if the ARCH variable contains aarch64.

CMakeLists.txt

index fba3575d4d63abc63fd8924e318f9acc986e9dc2..deb075d10691214f1a841e48fd3a54943cb82a65 100644 (file)
@@ -104,7 +104,7 @@ set_property(CACHE WITH_SANITIZER PROPERTY STRINGS "Memory" "Address" "Undefined
 if(BASEARCH_ARM_FOUND)
     option(WITH_ACLE "Build with ACLE" ON)
     option(WITH_NEON "Build with NEON intrinsics" ON)
-    cmake_dependent_option(WITH_ARMV6 "Build with ARMv6 SIMD" ON "NOT ARCH STREQUAL \"aarch64\"" OFF)
+    cmake_dependent_option(WITH_ARMV6 "Build with ARMv6 SIMD" ON "NOT ARCH MATCHES \"aarch64\"" OFF)
 elseif(BASEARCH_PPC_FOUND)
     option(WITH_ALTIVEC "Build with AltiVec (VMX) optimisations for PowerPC" ON)
     option(WITH_POWER8 "Build with optimisations for POWER8" ON)