From: Bartosz Taudul Date: Tue, 17 Sep 2024 10:46:11 +0000 (+0200) Subject: Fix build on aarch64 android. X-Git-Tag: 2.2.3~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68e31fa5c13643ae495aad3965b87f8e907a6101;p=thirdparty%2Fzlib-ng.git Fix build on aarch64 android. 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. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fba3575d4..deb075d10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)