When ld.gold is used as the linker, -Wl,--verbose doesn't output the OUTPUT_FORMAT line. As a result, gen_usr_ldscript doesn't write that in the linker script and the scripts confuse the linker w/ multilib.
i don't think there's a way to tease out the info from gold. i'm also not sure how much effort we want to expend on this when bug 479448 is coming.
(In reply to SpanKY from comment #1)
> i don't think there's a way to tease out the info from gold. i'm also not
> sure how much effort we want to expend on this when bug 479448 is coming.
It will still affect the packages afte 479448 is fixed. The underlying issue was that 'gcc -m32' found /usr/lib64/libfoo.la with no OUTPUT_FORMAT and assumed it is fine.
By the way, I think this function should actually read the output format from the library being wrapped rather than an unrelated linker invocation.
(In reply to Michał Górny from comment #2)
i think the underlying issue there is that people are using bad -L flags. i added this hack way back when really only to mitigate things (and clearly it's been working, but maybe too well).
reading the output format from the wrapped lib does make a lot of sense. i'd have to play around with binutils though to see if they support such a thing.
i remembered that glibc has similar code to auto use ld.bfd when gold is active, so i just cribbed that logic:
i'll leave this open though as a reminder to investigate the lib probing angle.