From: Nathan Moinvaziri Date: Sat, 20 Mar 2021 02:38:42 +0000 (-0700) Subject: Only perform auto-detection of floating point ABI on ARM arch. #895 X-Git-Tag: 2.0.2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c8fd54fb8043597cbe526832ea8d0a94de6fe83;p=thirdparty%2Fzlib-ng.git Only perform auto-detection of floating point ABI on ARM arch. #895 Co-authored-by: zhangn1985 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b39f1322..514d2d4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,8 +205,8 @@ else() if(NOT NATIVEFLAG) if(__GNUC__) if(BASEARCH_ARM_FOUND) - if(NOT CMAKE_C_FLAGS MATCHES "-mfloat-abi") - # Check support for ARM floating point + if("${ARCH}" MATCHES "arm" AND NOT CMAKE_C_FLAGS MATCHES "-mfloat-abi") + # Check support for ARM floating point ABI execute_process(COMMAND ${CMAKE_C_COMPILER} "-dumpmachine" OUTPUT_VARIABLE GCC_MACHINE) if("${GCC_MACHINE}" MATCHES "gnueabihf")