LTO multiple definition failures
Sandra Loosemore
sandra@codesourcery.com
Mon Jan 2 16:48:00 GMT 2012
On 01/02/2012 12:22 AM, Andi Kleen wrote:
> Sandra Loosemore<sandra@codesourcery.com> writes:
>>
>> I'm still finding my way around LTO; can anyone who's more familiar
>> with this help narrow down where to look for the cause of this? I
>> don't even know if this is a compiler or ld bug at this point. I'm
>
> I would look into the interaction between the LTO plugin and your ld
> (and also try gold if you can)
>
> Generally there are still various issues in these areas which need
> workarounds in the LTOed programs, for some things (like ld -r and some
> ar) you also need the latest version of HJ Lu's binutils which implement
> http://gcc.gnu.org/ml/gcc/2010-12/msg00229.html
>
> A lot of older binutils lds also tended to mishandle mixed LTOed ar
> archives.
For avoidance of doubt, I was using mainline HEAD for both gcc and
binutils for my powerpc-none-eabi experiments last week. The port for
our new target is based on GCC 4.6 and a binutils branch from a few
months ago, but it looked to me like the ld/gcc interaction was
basically the same -- the link error being triggered by a difference in
the startup code on the two targets, instead.
Anyway, the problem here isn't that I particularly care about coming up
with some workaround to make LTO work, but rather that tests from the
gcc testsuite are failing on this target because of what looks like
buggy LTO behavior instead of bugs in the target support, and I wanted
to be sure this was being tracked somewhere. I didn't see a relevant
issue in either the gcc or binutils bugzillas, but if it's a known
consequence of the ld -r problem, I'll shut up and go away again. ;-)
-Sandra
More information about the Gcc
mailing list