LTO resulting in a bigger binary?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux