From 0e1b3420fbb2a3022a1ceac49ce37af3e59d0856 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 14 Aug 2023 12:01:44 +0930 Subject: sim prune_warnings Remove some of the warnings generated by newer versions of ld. * testsuite/lib/sim-defs.exp (prune_warnings_extra): New. Arrange to run it from prune_warnings. --- sim/testsuite/lib/sim-defs.exp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'sim') diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp index 5528d64..54860f2 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 + } +} -- cgit v1.1