From becd91bb631eb5ce54d18fb8163cecdda75d2278 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 22 Dec 2018 00:00:04 -0600 Subject: [PATCH] lib/arm: NEON intrinsics require hardware floating point support NEON intrinsics cannot be used when compiling for an ARM CPU without hardware floating point support, e.g. the Debian armel port. In this case arm_neon.h cannot even be included as it causes an #error. [Based on a patch by Adrian Bunk , but changed to check for __ARM_FP instead of !__SOFTFP__ to be consistent with arm_neon.h, and added a comment.] --- common/compiler_gcc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/compiler_gcc.h b/common/compiler_gcc.h index 8bf5f5d..5311ac8 100644 --- a/common/compiler_gcc.h +++ b/common/compiler_gcc.h @@ -86,7 +86,9 @@ # define COMPILER_SUPPORTS_AVX2_TARGET_INTRINSICS \ COMPILER_SUPPORTS_AVX2_TARGET # endif -# elif defined(__arm__) || defined(__aarch64__) +# elif (defined(__arm__) && defined(__ARM_FP)) || defined(__aarch64__) + /* arm: including arm_neon.h requires hardware fp support */ + /* * Prior to gcc 6.1 (r230411 for arm, r226563 for aarch64), NEON * and crypto intrinsics not available in the main target could not be