aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <jeffreyalaw@gmail.com>2022-04-28 12:03:52 -0400
committerJeff Law <jeffreyalaw@gmail.com>2022-04-28 12:03:52 -0400
commitd993c6dea7c664aa26ee04210c471cfcb4e7d0e0 (patch)
treef008f6cf1dc797415670702415377aa439b5d437
parentcb1758d95cc12e3f2d6c0e295288e4867c2e7197 (diff)
downloadgcc-d993c6dea7c664aa26ee04210c471cfcb4e7d0e0.zip
gcc-d993c6dea7c664aa26ee04210c471cfcb4e7d0e0.tar.gz
gcc-d993c6dea7c664aa26ee04210c471cfcb4e7d0e0.tar.bz2
[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.
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr94157_0.c2
-rw-r--r--gcc/testsuite/lib/prune.exp5
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/pr94157_0.c b/gcc/testsuite/gcc.dg/lto/pr94157_0.c
index a76141b..a6e308b 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 4224985..04c6a1d 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