Trying to build Qt with -flto and -fuse-linker-plugin, using -fwhole-program for the helper apps results in
g++ -Wl,-rpath-link,/usr/src/ark/BUILD/qt/lib -m64 -O2 -fomit-frame-pointer -fweb -frename-registers -Wl,-O2,-z,combreloc,-z,relro,--enable-new-dtags,--hash-style=gnu -g -flto -fuse-linker-plugin -Wl,-rpath,/usr/lib64/qt4-embedded/lib -Wl,-rpath,/usr/lib64/qt4-embedded/lib -flto -fwhole-program -fuse-linker-plugin -o ../../../bin/moc release-static/moc.o release-static/preprocessor.o release-static/generator.o release-static/parser.o release-static/token.o release-static/main.o -L/usr/src/ark/BUILD/qt/src/tools/bootstrap -lbootstrap -lz collect2: ld terminated with signal 6 [Aborted] ld: ../../lto-plugin/lto-plugin.c:325: write_resolution: Assertion `syms' failed. Removing -fuse-linker-plugin "solves" the problem. gcc 4.5.0, gold from binutils 2.20.51.0.9 -- Summary: ld: ../../lto-plugin/lto-plugin.c:325: write_resolution: Assertion `syms' failed. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bero at arklinux dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44385