public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Darwin, testsuite : Prune 'object file not found for object'.
@ 2021-02-24 20:14 Iain Sandoe
  2021-03-03 19:39 ` ping^1 " Iain Sandoe
  0 siblings, 1 reply; 3+ messages in thread
From: Iain Sandoe @ 2021-02-24 20:14 UTC (permalink / raw)
  To: GCC-patches

Hi,

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.

I’ve had this patch kicking around for some time, in the hope that the
problem would be fixed in the XCode tools, but it’s still present in the
XC12.5b2 (and will never be fixed in older toolkits).

tested on *-darwin* and x86_64-linux-gnu,
OK for master?
Iain
(if were not in stage 4, I’d have applied it as obvious).

gcc/testsuite/ChangeLog:

	* lib/prune.exp: Prune useless output caused by a linker bug.
---
 gcc/testsuite/lib/prune.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index a349c8ace3e..2809f88b16f 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -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]
-- 
2.24.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* ping^1 Re: [PATCH] Darwin, testsuite : Prune 'object file not found for object'.
  2021-02-24 20:14 [PATCH] Darwin, testsuite : Prune 'object file not found for object' Iain Sandoe
@ 2021-03-03 19:39 ` Iain Sandoe
  2021-03-03 21:14   ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Iain Sandoe @ 2021-03-03 19:39 UTC (permalink / raw)
  To: GCC-patches

Iain Sandoe <iain@sandoe.co.uk> wrote:

> 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.
>
> I’ve had this patch kicking around for some time, in the hope that the
> problem would be fixed in the XCode tools, but it’s still present in the
> XC12.5b2 (and will never be fixed in older toolkits).
>
> tested on *-darwin* and x86_64-linux-gnu,
> OK for master?
> Iain
> (if were not in stage 4, I’d have applied it as obvious).

^^^
>
> gcc/testsuite/ChangeLog:
>
> 	* lib/prune.exp: Prune useless output caused by a linker bug.
> ---
> gcc/testsuite/lib/prune.exp | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
> index a349c8ace3e..2809f88b16f 100644
> --- a/gcc/testsuite/lib/prune.exp
> +++ b/gcc/testsuite/lib/prune.exp
> @@ -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]
> -- 
> 2.24.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ping^1 Re: [PATCH] Darwin, testsuite : Prune 'object file not found for object'.
  2021-03-03 19:39 ` ping^1 " Iain Sandoe
@ 2021-03-03 21:14   ` Jeff Law
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Law @ 2021-03-03 21:14 UTC (permalink / raw)
  To: Iain Sandoe, GCC-patches



On 3/3/21 12:39 PM, Iain Sandoe wrote:
> Iain Sandoe <iain@sandoe.co.uk> wrote:
>
>> 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.
>>
>> I’ve had this patch kicking around for some time, in the hope that the
>> problem would be fixed in the XCode tools, but it’s still present in the
>> XC12.5b2 (and will never be fixed in older toolkits).
>>
>> tested on *-darwin* and x86_64-linux-gnu,
>> OK for master?
>> Iain
>> (if were not in stage 4, I’d have applied it as obvious).
>
> ^^^
Then I'll give it an explicit OK :-)
jeff


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-03 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 20:14 [PATCH] Darwin, testsuite : Prune 'object file not found for object' Iain Sandoe
2021-03-03 19:39 ` ping^1 " Iain Sandoe
2021-03-03 21:14   ` 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).