From: Alan Modra via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: sim prune_warnings
Date: Mon, 14 Aug 2023 17:43:33 +0930 [thread overview]
Message-ID: <ZNniLeKvLHS55l2X@squeak.grove.modra.org> (raw)
Remove some of the warnings generated by newer versions of ld.
Without this patch "make check" in sim/ doesn't do much for some
targets.
OK?
* testsuite/lib/sim-defs.exp (prune_warnings_extra): New.
Arrange to run it from prune_warnings.
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 5528d64684b..54860f2ea51 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -651,3 +651,22 @@ proc slurp_options { file } {
close $f
return $opt_array
}
+
+proc prune_warnings_extra { text } {
+
+ regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*missing \\.note\\.GNU-stack section\[^\n\]*\n?)+" $text "\\1" text
+ regsub -all "(^|\n)(\[^\n\]*: NOTE: This behaviour is deprecated\[^\n\]*\n?)+" $text "\\1" text
+
+ regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*has a LOAD segment with RWX permissions\[^\n\]*\n?)+" $text "\\1" text
+
+ return $text
+}
+
+if { [info procs saved-prune_warnings] == [list] } {
+ rename prune_warnings saved-prune_warnings
+ proc prune_warnings { text } {
+ set text [saved-prune_warnings $text]
+ set text [prune_warnings_extra $text]
+ return $text
+ }
+}
--
Alan Modra
Australia Development Lab, IBM
next reply other threads:[~2023-08-14 8:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 8:13 Alan Modra via Gdb-patches [this message]
2023-08-31 13:25 ` Tom Tromey
2023-08-31 22:12 ` Alan Modra via Gdb-patches
2023-09-01 3:07 ` Tom Tromey
2023-10-15 9:38 ` Mike Frysinger
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=ZNniLeKvLHS55l2X@squeak.grove.modra.org \
--to=gdb-patches@sourceware.org \
--cc=amodra@gmail.com \
/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