From d695ae2130d1f28c529dc88f40ebeee27df69730 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Thu, 16 May 2019 08:36:05 +0000 Subject: [PATCH] testsuite - improve check_effective_target_cet. 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 * lib/target-supports.exp (check_effective_target_cet): Add the -fcf-protection flag to the build conditions. From-SVN: r271282 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/lib/target-supports.exp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dc4edeffabc..2c5f63848e9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-05-16 Iain Sandoe + + * lib/target-supports.exp (check_effective_target_cet): Add the + -fcf-protection flag to the build conditions. + 2019-05-16 Jun Ma PR tree-optimization/90106 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 324a9fef96a..63bc2cc4b23 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -9225,7 +9225,7 @@ proc check_effective_target_cet { } { { asm ("setssbsy"); } - } "-O2" ] + } "-O2 -fcf-protection" ] } # Return 1 if target supports floating point "infinite" -- 2.30.2