On Tue, Feb 1, 2011 at 10:39 AM, Dave Korn <dave.korn.cyg...@gmail.com> wrote: > On 01/02/2011 18:01, H.J. Lu wrote: > >>>> FWIW, your recan linker patch doesn't fix LTO 8, which is: >>>> >>>> http://sourceware.org/bugzilla/show_bug.cgi?id=12277 >>> It wasn't supposed to, we've been through this before. It needs both the >>> link-order fix *and* the rescan-libs fix. The combined pair of patches I >>> sent >>> Joel (one of which is indeed that first patch, the second of which is for >>> lib >>> rescanning) *does* fix LTO 8 on i686/Linux, I tested it. >>> >> >> I applied 2 patches of yours, With gcc version 4.6.0 revision 169143, I got >> >> /usr/gcc-4.6/bin/gcc >> -B/export/build/gnu/binutils-lto/build-i686-linux/ld/tmpdir/ld/ >> -L/usr/local/i686-linux/lib -L/usr/local/lib -L/lib -L/usr/lib -m32 >> -o tmpdir/lto-8.exe >> -L/net/gnu-6/export/gnu/src/binutils/binutils/ld/testsuite/ld-plugin >> -O2 -flto -fuse-linker-plugin tmpdir/lto-8b.o tmpdir/lto-8a.o >> tmpdir/dummy.o >> Executing on host: sh -c {/usr/gcc-4.6/bin/gcc >> -B/export/build/gnu/binutils-lto/build-i686-linux/ld/tmpdir/ld/ >> -L/usr/local/i686-linux/lib -L/usr/local/lib -L/lib -L/usr/lib -m32 >> -o tmpdir/lto-8.exe >> -L/net/gnu-6/export/gnu/src/binutils/binutils/ld/testsuite/ld-plugin >> -O2 -flto -fuse-linker-plugin tmpdir/lto-8b.o tmpdir/lto-8a.o >> tmpdir/dummy.o 2>&1} /dev/null ld.tmp (timeout = 300) >> /export/build/gnu/binutils-lto/build-i686-linux/ld/tmpdir/ld/ld: >> tmpdir/lto-8.exe: hidden symbol `bar' isn't defined >> /export/build/gnu/binutils-lto/build-i686-linux/ld/tmpdir/ld/ld: final >> link failed: Bad value >> collect2: ld returned 1 exit status > > *facepalm* D'oh, sorry for the confusion. I got mixed up with LTO 2, which > is the missing -lm reference problem; it resolves that one. Sorry, this is > the left-over undefined symbols problem, that is going to need a further > patch. >
I opened: http://www.sourceware.org/bugzilla/show_bug.cgi?id=12456 -- H.J.