From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed] [gdb/testsuite] Require -fsplit-stack in gdb.base/morestack.exp
Date: Tue, 21 Feb 2023 14:41:31 +0100 [thread overview]
Message-ID: <20230221134131.1438-1-tdevries@suse.de> (raw)
On aarch64-linux, I run into:
...
gdb compile failed, cc1: error: '-fsplit-stack' is not supported by this \
compiler configuration
UNTESTED: gdb.base/morestack.exp: failed to prepare
...
Fix this by requiring -fsplit-stack, such that we have instead:
...
UNSUPPORTED: gdb.base/morestack.exp: require failed: \
expr [have_compile_flag -fsplit-stack]
...
Tested on x86_64-linux and aarch64-linux.
---
gdb/testsuite/gdb.base/morestack.exp | 2 ++
gdb/testsuite/lib/gdb.exp | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/morestack.exp
index a60a3de5a3a..b4d22187390 100644
--- a/gdb/testsuite/gdb.base/morestack.exp
+++ b/gdb/testsuite/gdb.base/morestack.exp
@@ -15,6 +15,8 @@
require is_c_compiler_gcc
+require {expr [have_compile_flag -fsplit-stack]}
+
standard_testfile
set opts "additional_flags=-fsplit-stack"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 12839a54710..6864dac3ac9 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -9408,5 +9408,13 @@ proc have_syscall { name } {
return [gdb_can_simple_compile have_syscall_$name $src object]
}
+# Return 1 if compile flag FLAG is supported.
+
+proc have_compile_flag { flag } {
+ set src { void foo () {} }
+ return [gdb_can_simple_compile have_compile_flag_$flag $src object \
+ additional_flags=$flag]
+}
+
# Always load compatibility stuff.
load_lib future.exp
base-commit: b3060b05134f47f6c6aba72f31746822343252ac
--
2.35.3
reply other threads:[~2023-02-21 13:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230221134131.1438-1-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).