testsuite, i386: Only check for cfi directives if supported [PR112729]
commit8ee480441eaec87ca6e0b0963fe9aade7edd1e8a
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 29 Nov 2023 13:52:04 +0000 (29 14:52 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 29 Nov 2023 13:52:04 +0000 (29 14:52 +0100)
tree724de5e61b6f3cfeb5a9bdad5b60e34c0e913a08
parent58baac57d6f3c0f723c1fd6ae338752e73e42934
testsuite, i386: Only check for cfi directives if supported [PR112729]

gcc.target/i386/apx-interrupt-1.c and two more tests FAIL on Solaris/x86
with the native assembler.  Like Darwin as, it doesn't support cfi
directives.  Instead of adding more and more targets in every affected
test, this patch introduces a cfi effective-target keyword to check for
the prerequisite.

Tested on i386-pc-solaris2.11 (as and gas), x86_64-pc-linux-gnu, and
x86_64-apple-darwin23.1.0.

2023-11-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc/testsuite:
PR testsuite/112729
* lib/target-supports.exp (check_effective_target_cfi): New proc.
* gcc.target/i386/apx-interrupt-1.c: Require cfi instead of
skipping on *-*-darwin*.
* gcc.target/i386/apx-push2pop2_force_drap-1.c: Likewise.
* gcc.target/i386/apx-push2pop2-1.c: Likewise.

gcc:
PR testsuite/112729
* doc/sourcebuild.texi (Effective-Target Keywords, Environment
attributes): Document cfi.
gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.target/i386/apx-interrupt-1.c
gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c
gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c
gcc/testsuite/lib/target-supports.exp