[Bug lto/49844] Building CodeBlocks on Windows using mingw gcc 4.6.1 "-flto -fuse-linker-plugin" results in many linker stage errors
matt at use dot net
gcc-bugzilla@gcc.gnu.org
Thu Aug 18 19:03:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49844
Matt Hargett <matt at use dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matt at use dot net
--- Comment #4 from Matt Hargett <matt at use dot net> 2011-08-18 19:01:29 UTC ---
When building scummvm with gcc 4.6.1, I had a bunch of multiple definition
linker errors that also went away when adding -flto-partition=none . Here are
the errors I had before said workaround:
$ gcc --version
gcc-4.6.real (Ubuntu/Linaro 4.6.1-7ubuntu1) 4.6.1
$ CFLAGS="-Ofast -flto" CXXFLAGS="-Ofast -flto" LDFLAGS="-flto=8
-fuse-linker-plugin -fwhole-program" ./configure
[...]
$ make -j9
[...]
LINK scummvm
cup_player_he.o (symbol from plugin): warning: memset used with constant zero
length parameter; this could be due to transposed parameters
/tmp/ccMxgdJj.ltrans20.ltrans.o:(.rodata+0x1afa0): multiple definition of
`_ZTVN5Scumm9ScummFileE.local.7841'
/tmp/ccMxgdJj.ltrans0.ltrans.o:(.rodata+0xc320): first defined here
/tmp/ccMxgdJj.ltrans20.ltrans.o:(.rodata+0x1b080): multiple definition of
`_ZTTN5Scumm9ScummFileE.local.7842'
/tmp/ccMxgdJj.ltrans0.ltrans.o:(.rodata+0xc2a0): first defined here
/tmp/ccMxgdJj.ltrans20.ltrans.o:(.rodata+0x23780): multiple definition of
`_ZTVN6Common16MemoryReadStreamE.local.9080'
/tmp/ccMxgdJj.ltrans5.ltrans.o:(.rodata+0x6440): first defined here
/tmp/ccMxgdJj.ltrans20.ltrans.o:(.rodata+0x23840): multiple definition of
`_ZTTN6Common16MemoryReadStreamE.local.9093'
/tmp/ccMxgdJj.ltrans5.ltrans.o:(.rodata+0x6400): first defined here
collect2: ld returned 1 exit status
make: *** [scummvm] Error 1
Let me know if you want a tarball of this source tree attached; downloading the
latest scummvm source tarball should give the same results.
More information about the Gcc-bugs
mailing list