aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
diff options
context:
space:
mode:
authorCarl Love <cel@us.ibm.com>2022-07-13 15:09:33 +0000
committerCarl Love <cel@us.ibm.com>2022-07-13 15:13:05 +0000
commit43127ae5714999118898511e0ec862d892af8106 (patch)
tree70a347af219919a8d93074340ba33d8699710cc7 /gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
parent0f443d1b70ff8c338a536b5ce1cd963f8ee8d206 (diff)
downloadfsf-binutils-gdb-43127ae5714999118898511e0ec862d892af8106.zip
fsf-binutils-gdb-43127ae5714999118898511e0ec862d892af8106.tar.gz
fsf-binutils-gdb-43127ae5714999118898511e0ec862d892af8106.tar.bz2
Fix gdb.base/step-indirect-call-thunk.exp
Due to recent changes in the default value of -fcf-protection for gcc, the test gdb.base/step-indirect-call-thunk.exp fails on Intel X86-64 with the error: Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never -mindirect-branch=thunk -mfunction-return=thunk -c -g -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-thunk/step-indirect-call-thunk0.o /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -mindirect-branch=thunk -mfunction-return=thunk -c -g -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-thunk/step-indirect-call-thunk0.o /.../binutils-gdb-current/gdb/testsuite/gdb.base/step-indirect-call-thunk.c /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c: In function 'inc': /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c: 22:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible 22 | { /* inc.1 */ As stated in the error message the default "-fcf-protection" and "-mindirect-branch' are in compatible. The fcf-protection argument needs to be "-fcf-protection=none" for the test to compile on Intel. The gcc command line "-mindirect-branch' is an Intel specific and will give an error on other platforms. A check for X86 is added so the test will only run on X86 platforms. The patch has been tested and verified on Power 10 and Intel X86-64 systems with no regressions.
Diffstat (limited to 'gdb/testsuite/gdb.base/step-indirect-call-thunk.exp')
-rw-r--r--gdb/testsuite/gdb.base/step-indirect-call-thunk.exp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
index 761e1d9..7c1b53c 100644
--- a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
+++ b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
@@ -15,7 +15,11 @@
standard_testfile
-set cflags "-mindirect-branch=thunk -mfunction-return=thunk"
+if { ![istarget "x86*"] } {
+ return
+}
+
+set cflags "-mindirect-branch=thunk -mfunction-return=thunk -fcf-protection=none"
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
[list debug "additional_flags=$cflags"]] } {
return -1