[gcc(refs/users/aoliva/heads/testme)] testsuite: arm: restore defaults for multilib test
Alexandre Oliva
aoliva@gcc.gnu.org
Sat Mar 28 16:25:51 GMT 2026
https://gcc.gnu.org/g:7c687d23913197a33fdc9aa67ba62062eef97103
commit 7c687d23913197a33fdc9aa67ba62062eef97103
Author: Alexandre Oliva <oliva@adacore.com>
Date: Wed Feb 4 23:50:28 2026 -0300
testsuite: arm: restore defaults for multilib test
When default-overriding options go in TOOL_OPTIONS, rather than in
site.exp's cflags or multilib_flags, we don't skip multilib.exp, but
those options may still interfere with multilib selection.
Add cpu and fpu resetting-to-default options before multilib options
under test, and set -mfloat-abi to a setting compatible with all
combinations of options under test that don't override it.
Arrange for -mfpu=* and -mfloat-abi=* options to negate each other,
like -march and -mcpu, so that the overridden options are eliminated
early on in prune_options, and don't affect multilib selection with
conflicting choices.
for gcc/ChangeLog
* gcc/config/arm/arm.opt (mfloat-abi=, mfpu=): Set Negative.
for gcc/testsuite/ChangeLog
* gcc.target/arm/multilib.exp (check_multi_dir): Prepend
default-resetting options.
Diff:
---
gcc/config/arm/arm.opt | 4 ++--
gcc/testsuite/gcc.target/arm/multilib.exp | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
index e92a81312526..2a2239245d7b 100644
--- a/gcc/config/arm/arm.opt
+++ b/gcc/config/arm/arm.opt
@@ -115,7 +115,7 @@ Target Save RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string)
Specify the name of the target CPU.
mfloat-abi=
-Target RejectNegative Joined Enum(float_abi_type) Var(arm_float_abi) Init(TARGET_DEFAULT_FLOAT_ABI)
+Target RejectNegative Negative(mfloat-abi=) Joined Enum(float_abi_type) Var(arm_float_abi) Init(TARGET_DEFAULT_FLOAT_ABI)
Specify if floating point hardware should be used.
mcmse
@@ -157,7 +157,7 @@ EnumValue
Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE)
mfpu=
-Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index) Init(TARGET_FPU_auto) Save
+Target RejectNegative Negative(mfpu=) Joined Enum(arm_fpu) Var(arm_fpu_index) Init(TARGET_FPU_auto) Save
Specify the name of the target floating point hardware/format.
mhard-float
diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp
index b824173e7987..ea9baf4b0157 100644
--- a/gcc/testsuite/gcc.target/arm/multilib.exp
+++ b/gcc/testsuite/gcc.target/arm/multilib.exp
@@ -42,7 +42,9 @@ proc multilib_config {profile} {
proc check_multi_dir { gcc_opts multi_dir } {
global tool
- set options [list "additional_flags=[concat "--print-multi-directory" $gcc_opts]"]
+ # Restore CPU, FPU and ABI defaults so that even if TOOL_OPTIONS
+ # set them, that won't affect our testing.
+ set options [list "additional_flags=[concat "--print-multi-directory -mcpu=unset -mfpu=auto -mfloat-abi=soft" $gcc_opts]"]
set gcc_output [${tool}_target_compile "" "" "none" $options]
if { [string match "$multi_dir\n" $gcc_output] } {
pass "multilibdir $gcc_opts $multi_dir"
More information about the Gcc-cvs
mailing list