From 2c8fd54fb8043597cbe526832ea8d0a94de6fe83 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Fri, 19 Mar 2021 19:38:42 -0700 Subject: [PATCH] Only perform auto-detection of floating point ABI on ARM arch. #895 Co-authored-by: zhangn1985 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b39f1322b..514d2d4aa 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") -- 2.47.3