I'm experimenting with LTO on a small project, but I'm not quite sure
I've got it to work properly, because the binary is bigger with LTO
rather than smaller (which is what I would expect).
I've added "-flto" to $CFLAGS, and "-flto=4 -fuse-linker-plugin
-fuse-ld=gold" to the LDFLAGS.
The complete CFLAGS are "-O2 -flto -pipe", and LDFLAGS are
"-Wl,--hash-style=gnu -Wl,--as-needed -O2 -flto=4 -fuse-linker-plugin
-fuse-ld=gold -Wl,--sort-common"
Am I doing something wrong or is this The Way(tm)?
--
chs