https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97637
Bug ID: 97637 Summary: Compiling with LTO causes a bigger binary Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: christer.solskogen at gmail dot com CC: marxin at gcc dot gnu.org Target Milestone: --- I've been experimenting with amiberry (https://github.com/midwan/amiberry/tree/dev) a Amiga emulator to compile it with LTO. The emulator requires a ARM machine (Raspberry Pi will do) The final binary are 0.4MB bigger when compiled with LTO. I've added "flto -march=native" to CFLAGS and "flto=$(shell nproc) $(CFLAGS) -fuse-linker-plugin -fuse-ld=gold -Wl,--sort-common" to LDFLAGS. I've tried with both gold and ld.bfd.