[gdb/testsuite] Require compilation flags in two gdb.arch/aarch64 test-cases
authorTom de Vries <tdevries@suse.de>
Tue, 21 Feb 2023 14:26:24 +0000 (15:26 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 21 Feb 2023 14:26:24 +0000 (15:26 +0100)
With test-cases gdb.arch/aarch64-mte-core.exp and gdb.arch/aarch64-pauth.exp I
run into compilation errors due to unsupported compilation flags.

Fix this by requiring the compilation flags, such that I have instead:
...
UNSUPPORTED: gdb.arch/aarch64-mte-core.exp: require failed: \
  have_compile_flag -march=armv8.5-a+memtag
UNSUPPORTED: gdb.arch/aarch64-pauth.exp: require failed: \
  have_compile_flag -mbranch-protection=pac-ret+leaf
...

Tested on aarch64-linux.

gdb/testsuite/gdb.arch/aarch64-mte-core.exp
gdb/testsuite/gdb.arch/aarch64-pauth.exp

index dde5df47b1a271f87e39d341fbd4c8b1562df911..6127ffb302bc5a2cc885a8a784604b143fb2f7ea 100644 (file)
@@ -166,6 +166,8 @@ proc test_mode { mode } {
 
 require is_aarch64_target
 
+require {have_compile_flag -march=armv8.5-a+memtag}
+
 # Run tests
 foreach_with_prefix mode {"sync" "async"} {
     test_mode $mode
index d0dfaf969006a12c7b63bf6009f82063085c1085..36d8e72207265e87fa83bb4db0bb32fec73ea48b 100644 (file)
@@ -19,6 +19,8 @@
 
 require is_aarch64_target
 
+require {have_compile_flag -mbranch-protection=pac-ret+leaf}
+
 # Build program with address signing forced on.
 standard_testfile
 set compile_flags {debug}