This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR42070 by pruning harmless linker warnings on darwin
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: mikestump at comcast dot net, iains at gcc dot gnu dot org
- Date: Thu, 9 Sep 2010 12:02:24 -0400
- Subject: [PATCH] Fix PR42070 by pruning harmless linker warnings on darwin
Currently darwin10 is failing the excessive error test for the compilation of
g++.dg/tree-prof/partition1.C and g++.dg/tree-prof/partition2.C with -g -fprofile-use
due to the bogus linker warnings "ld: warning: can't add line info to anonymous symbol".
This warning has been removed from the next Xcode release due to the excessive noise
it generates when linking. Since the resulting binaries created with these bogus
warnings all execute fine, this warning should be ignored. The attached patch adds an
an entry to gcc/testsuite/lib/prune.exp. Tested on x86_64-apple-darwin10. Okay for
gcc trunk as well as gcc 4.5.2?
Jack
ps I added the pruning to gcc/testsuite/lib/prune.exp instead of just adding a
dg-prune-output entry to the test cases because that approach produces warnings
during the testsuite run of the form...
WARNING: profopt.exp does not support dg-prune-output
2010-09-09 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/42070
* gcc/testsuite/lib/prune.exp: Prune bogus linker warnings.
Index: gcc/testsuite/lib/prune.exp
===================================================================
--- gcc/testsuite/lib/prune.exp (revision 164110)
+++ gcc/testsuite/lib/prune.exp (working copy)
@@ -49,6 +49,9 @@
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
+ # Ignore harmless warnings from Xcode 3.2.x.
+ regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol" $text "" text
+
#send_user "After:$text\n"
return $text