testsuite - improve check_effective_target_cet.
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 16 May 2019 08:36:05 +0000 (08:36 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Thu, 16 May 2019 08:36:05 +0000 (08:36 +0000)
In some cases the test using setssbsy was not enough to
detemine support for the CET insns.  Adding -fcf-protection
explicitly causes other insns to be emitted (e.g. endbr32/64)
which are a more complete check.

2019-05-16  Iain Sandoe  <iain@sandoe.co.uk>

* lib/target-supports.exp (check_effective_target_cet): Add the
-fcf-protection flag to the build conditions.

From-SVN: r271282

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index dc4edeffabce1e981aaff245f3e887d6564f2ef9..2c5f63848e9d411097329e649c7044b8017600f8 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-16  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * lib/target-supports.exp (check_effective_target_cet): Add the
+       -fcf-protection flag to the build conditions.
+
 2019-05-16  Jun Ma <JunMa@linux.alibaba.com>
 
        PR tree-optimization/90106
index 324a9fef96a37c2839f961aab34a3512bb3daf71..63bc2cc4b235b3a8d70fd1f99c9efeb72f92cafa 100644 (file)
@@ -9225,7 +9225,7 @@ proc check_effective_target_cet { } {
        {
          asm ("setssbsy");
        }
-    } "-O2" ]
+    } "-O2 -fcf-protection" ]
 }
 
 # Return 1 if target supports floating point "infinite"