]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: i386: Restrict gcc.target/i386/fhardened-1.c etc. to Linux/GNU
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 15 Apr 2024 09:16:23 +0000 (11:16 +0200)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 15 Apr 2024 09:16:23 +0000 (11:16 +0200)
The new gcc.target/i386/fhardened-1.c etc. tests FAIL on Solaris/x86 and
Darwin/x86:

FAIL: gcc.target/i386/fhardened-1.c (test for excess errors)
FAIL: gcc.target/i386/fhardened-2.c (test for excess errors)

Excess errors:
cc1: warning: '-fhardened' not supported for this target

Support for -fhardened is restricted to HAVE_FHARDENED_SUPPORT in
toplev.cc (process_options) which again is only defined for linux*|gnu*
targets in gcc/configure.ac.

Accordingly, this patch restricts the tests to those two, as is already
done in gcc.target/i386/cf_check-6.c.

Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.

2024-04-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc/testsuite:
* gcc.target/i386/fhardened-1.c: Restrict to Linux/GNU.
* gcc.target/i386/fhardened-2.c: Likewise.

gcc/testsuite/gcc.target/i386/fhardened-1.c
gcc/testsuite/gcc.target/i386/fhardened-2.c

index 55d1718ff5575196ad0904d8cee7c093ef443923..f51820e285f9d9ecca9f7658368f2c3dcfeb63f4 100644 (file)
@@ -1,4 +1,5 @@
 /* PR target/114606 */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
 /* { dg-options "-fhardened -O2 -fcf-protection=none" } */
 
 #ifdef __CET__
index 9b8c1381c19475dab9fb5c3a8d27822413f2208a..ed2a674492182d92a19ba9755b450b17fa152d8d 100644 (file)
@@ -1,4 +1,5 @@
 /* PR target/114606 */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
 /* { dg-options "-fhardened -O2" } */
 
 #if __CET__ != 3