public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-8314] [committed] Fix more problems with new linker warnings
@ 2022-04-28 16:09 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2022-04-28 16:09 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:af71f96631920f32ed9ec6c1c35d140dbe9992d1

commit r12-8314-gaf71f96631920f32ed9ec6c1c35d140dbe9992d1
Author: Jeff Law <jeffreyalaw@gmail.com>
Date:   Thu Apr 28 12:03:52 2022 -0400

    [committed] Fix more problems with new linker warnings
    
    gcc/testsuite
            * gcc.dg/lto/pr94157_0.c: Revert last change.
            * lib/prune.exp (prune_gcc_output): Prune new linker warning.

Diff:
---
 gcc/testsuite/gcc.dg/lto/pr94157_0.c | 2 +-
 gcc/testsuite/lib/prune.exp          | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/lto/pr94157_0.c b/gcc/testsuite/gcc.dg/lto/pr94157_0.c
index a76141b1809..a6e308b855b 100644
--- a/gcc/testsuite/gcc.dg/lto/pr94157_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr94157_0.c
@@ -1,6 +1,6 @@
 /* { dg-lto-do link } */
 /* { dg-require-effective-target gas } */
-/* { dg-lto-options { { -O0 -fipa-vrp -flto -Wa,--noexecstack -Wa,--noexecstack -Wa,--execstack  -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wl,-z,execstack} } } */
+/* { dg-lto-options { { -O0 -fipa-vrp -flto -Wa,--noexecstack -Wa,--noexecstack -Wa,--execstack  -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack } } } */
 
 int main() {
 
diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index 422498527aa..04c6a1dd7a1 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -82,6 +82,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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-28 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 16:09 [gcc r12-8314] [committed] Fix more problems with new linker warnings Jeff Law

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).