https://gcc.gnu.org/g:de08b13018a13970475a4936265673b21dccb691
commit r14-11404-gde08b13018a13970475a4936265673b21dccb691 Author: Richard Earnshaw <rearn...@arm.com> Date: Tue Mar 11 10:48:54 2025 +0000 arm: testsuite: fix arm_neon_h checks with conflicting cpu/arch GCC will complain if the -mcpu flag specifies a different architecture to that specified in -march, but if the floating-point ABI is "soft", then differences in the floating-point architecture features are ignored. However, the arm_libc_fp_abi checks whether we change the FP ABI by adding -mfloat-abi=hard/softfp to override the defaults. If that fails it won't add anything. Unfortunately arm_neon_h_ok wasn't correctly checking whether the libc check had worked and just assumed that it would always add something to enable FP. That's insufficient and we need to consider this failure. We simply mark tests as unsupported in this case. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_arm_neon_h_ok_nocache): Return zero if check_effective_target_arm_libc_fp_abi_ok reports failure. (cherry picked from commit 1b7a05770833eb210783ec8babd0027ec237d191) Diff: --- gcc/testsuite/lib/target-supports.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 112ff52bec19..e9f9bb06f3be 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -4794,7 +4794,8 @@ proc add_options_for_arm_libc_fp_abi { flags } { proc check_effective_target_arm_neon_h_ok_nocache { } { # none-arm or thumb1 cannot support neon, so there's no point in # looking further. - if { [istarget arm*-*-*] } { + if { [istarget arm*-*-*] + && [check_effective_target_arm_libc_fp_abi_ok]} { global et_arm_neon_h_flags set base_flags [add_options_for_arm_libc_fp_abi ""] foreach flags {"" "-mfpu=auto" "-marm" "-marm -mfpu=auto" \