Hi all, Now that we've moved to pragmas guarding the various intrinsics in arm_neon.h I think we should still throw a #error if someone tries to include the header while compiling for -mfloat-abi=soft.
This gives a more helpful error message when someone has a compiler configured --with-float=soft and forgets to add an appropriate -mfloat-abi option on the command line. Currently we'll just give tons of error messages whereas with this patch we just show a simple clean message. Tested on arm. This could be argued to be a user experience regression fix. Ok for trunk? Thanks, Kyrill 2016-02-29 Kyrylo Tkachov <kyrylo.tkac...@arm.com> * config/arm/arm_neon.h: Show error if using with soft-float ABI.
diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h index 47816d52187b979b92d7592991d29e4cbe8f9357..6a880235d24759e9938fb08365eaddff77d60f0e 100644 --- a/gcc/config/arm/arm_neon.h +++ b/gcc/config/arm/arm_neon.h @@ -27,6 +27,10 @@ #ifndef _GCC_ARM_NEON_H #define _GCC_ARM_NEON_H 1 +#ifndef __ARM_FP +#error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softp or -mfloat-abi=hard" +#else + #pragma GCC push_options #pragma GCC target ("fpu=neon") @@ -14833,3 +14837,4 @@ vmull_high_p64 (poly64x2_t __a, poly64x2_t __b) #pragma GCC pop_options #endif +#endif