Hi,
The attached testsuite patch makes
gcc.target/arm/copysign_softfloat_1.c UNSUPPORTED on
arm-none-linux-gnueabihf, rather than FAIL/UNRESOLVED because of a
link failure since the toolchain startup code is in hard-float ABI
while the testcase is compiled with -mfloat-abi=soft.
Tested on arm* configurations, with no impact on arm*eabi and
FAIL->UNSUPPORTED on arm*hf targets.
OK?
Thanks,
Christophe
gcc/testsuite/ChangeLog:
2017-11-10 Christophe Lyon <[email protected]>
* lib/target-supports.exp (check_effective_target_arm_soft_ok):
New function.
* gcc.target/arm/copysign_softfloat_1.c: Require arm_soft_ok
effective target.
diff --git a/gcc/testsuite/lib/target-supports.exp
b/gcc/testsuite/lib/target-supports.exp
index d7ef04f..6917a4d 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3413,6 +3413,19 @@ proc check_effective_target_arm_vect_no_misalign { } {
}
+# Return 1 if this is an ARM target supporting -mfloat-abi=soft. Some
+# multilibs may be incompatible with this option.
+
+proc check_effective_target_arm_soft_ok { } {
+ if { [check_effective_target_arm32] } {
+ return [check_no_compiler_messages arm_soft_ok executable {
+ int main() { return 0;}
+ } "-mfloat-abi=soft"]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this is an ARM target supporting -mfpu=vfp
# -mfloat-abi=softfp. Some multilibs may be incompatible with these
# options.
diff --git a/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c
b/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c
index 1260a6f..d79d014 100644
--- a/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c
+++ b/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c
@@ -1,5 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-require-effective-target arm_soft_ok } */
/* { dg-skip-if "skip override" { *-*-* } { "-mfloat-abi=softfp"
"-mfloat-abi=hard" } { "" } } */
/* { dg-options "-O2 -mfloat-abi=soft --save-temps" } */
extern void abort (void);