On Sunday, 23 March 2014 at 07:51:14 UTC, Johannes Pfau wrote:
Some time ago LTO was only supported by the gold linker, so you
might
need to configure binutils with --enable-gold --enable-plugins
--enable-lto
GCC should also be compiled with --enable-gold --enable-plugins
--enable-lto
http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
also says if you link manually you must use gcc to link, not ld
and
pass -flto when linking as well:
gcc -o myprog -flto -O2 foo.o bar.o
You can also try passing -fuse-linker-plugin to all gcc
commands.
I never used LTO though, so I'm not sure if this will actually
help :-)
You were right, I have to link with gcc to get LTO to kick in.
And sure enough Bug 88 symptoms appeared. At least I now know
why nothing was happening. Thank you!