]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm: testsuite: fix arm_neon_h checks with conflicting cpu/arch
authorRichard Earnshaw <rearnsha@arm.com>
Tue, 11 Mar 2025 10:48:54 +0000 (10:48 +0000)
committerTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Wed, 12 Mar 2025 05:39:57 +0000 (06:39 +0100)
commitde08b13018a13970475a4936265673b21dccb691
tree6ff1fe6180f4dacf3c69b7d76addc3826dfb6981
parentf1dd3a17cf34d26f448bc2fd4f6c218c38140b08
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)
gcc/testsuite/lib/target-supports.exp