Darwin, testsuite : Prune 'object file not found for object'.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 10 Jan 2021 09:48:13 +0000 (09:48 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Thu, 4 Mar 2021 19:35:27 +0000 (19:35 +0000)
This is not a GCC problem, but a fault in the static linker where,
when a source file is used multiple times, with conditional compilation
the source file is only referenced by the linker for the first object.
Then, when dsymutil tries to find the source file for next object based
off that source there is no record for it.

gcc/testsuite/ChangeLog:

* lib/prune.exp: Prune useless output caused by a linker bug.

gcc/testsuite/lib/prune.exp

index a349c8a..2809f88 100644 (file)
@@ -84,6 +84,9 @@ proc prune_gcc_output { text } {
     # Ignore harmless warnings from Xcode 4.0.
     regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text
 
+    # Ignore dsymutil warning (tool bug is actually linker)
+    regsub -all "(^|\n)\[^\n\]*could not find object file symbol for symbol\[^\n\]*" $text "" text
+
     # If dg-enable-nn-line-numbers was provided, then obscure source-margin
     # line numbers by converting them to "NN" form.
     set text [maybe-handle-nn-line-numbers $text]