public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.base/nested-subp{2,3}.exp with recent ld Date: Wed, 12 Oct 2022 14:50:26 +0000 (GMT) [thread overview] Message-ID: <20221012145026.DEB07385040C@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9693166f6648b3aaa7dc680b3fecda16b63ecfb4 commit 9693166f6648b3aaa7dc680b3fecda16b63ecfb4 Author: Tom de Vries <tdevries@suse.de> Date: Wed Oct 12 16:50:16 2022 +0200 [gdb/testsuite] Fix gdb.base/nested-subp{2,3}.exp with recent ld On openSUSE Tumbleweed (with ld 2.39) I get for test-case gdb.base/nested-subp2.exp: ... gdb compile failed, ld: warning: tmp.o: requires executable stack \ (because the .note.GNU-stack section is executable) ... Fix this by compiling with -Wl,--no-warn-execstack. Likewise in gdb.base/nested-subp3.exp Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.base/nested-subp2.exp | 15 ++++++++++++--- gdb/testsuite/gdb.base/nested-subp3.exp | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.base/nested-subp2.exp b/gdb/testsuite/gdb.base/nested-subp2.exp index efc8dc5c25b..7716e7c8ace 100644 --- a/gdb/testsuite/gdb.base/nested-subp2.exp +++ b/gdb/testsuite/gdb.base/nested-subp2.exp @@ -29,10 +29,19 @@ if ![support_nested_function_tests] { return -1 } +set flags {} +lappend flags debug +lappend flags additional_flags=-std=gnu99 + +set ld_flags additional_flags=-Wl,--no-warn-execstack +if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \ + $ld_flags] } { + lappend flags $ld_flags +} + if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \ - [standard_output_file "${testcase}"] \ - executable \ - [list debug "additional_flags=-std=gnu99"]] != "" } { + [standard_output_file "${testcase}"] \ + executable $flags] != "" } { return -1 } diff --git a/gdb/testsuite/gdb.base/nested-subp3.exp b/gdb/testsuite/gdb.base/nested-subp3.exp index fc87631c342..b547b8efd35 100644 --- a/gdb/testsuite/gdb.base/nested-subp3.exp +++ b/gdb/testsuite/gdb.base/nested-subp3.exp @@ -29,10 +29,19 @@ if ![support_nested_function_tests] { return -1 } +set flags {} +lappend flags debug +lappend flags additional_flags=-std=gnu99 + +set ld_flags additional_flags=-Wl,--no-warn-execstack +if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \ + $ld_flags] } { + lappend flags $ld_flags +} + if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \ - [standard_output_file "${testcase}"] \ - executable \ - [list debug "additional_flags=-std=gnu99"]] != "" } { + [standard_output_file "${testcase}"] \ + executable $flags] != "" } { return -1 }
reply other threads:[~2022-10-12 14:50 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=20221012145026.DEB07385040C@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).