]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[committed] Fix more problems with new linker warnings
authorJeff Law <jeffreyalaw@gmail.com>
Thu, 28 Apr 2022 16:03:52 +0000 (12:03 -0400)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 10 May 2022 16:47:29 +0000 (09:47 -0700)
gcc/testsuite
* lib/prune.exp (prune_gcc_output): Prune new linker warning.

(cherry picked from commit d993c6dea7c664aa26ee04210c471cfcb4e7d0e0)

gcc/testsuite/lib/prune.exp

index eea4bf383a7844f4a28a30d1311e3b1bfd89469e..83d394a588661554c412801dbef8326025874b1e 100644 (file)
@@ -66,6 +66,11 @@ proc prune_gcc_output { text } {
     regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
     regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
 
+    # Ideally the tests would indicate that executable stacks were needed
+    # to the linker.  But the option for that varies and may not even exist
+    # on some targets.  So we're stuck pruning the warning.
+    regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*requires executable stack\[^\n\]*\n?)+" $text "\\1" text
+
     # Ignore harmless warnings from Xcode 3.2.x.
     regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text
     regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*FORM_ref4\[^\n\]*" $text "" text