Attention is currently required from: Nico Huber, Stefan Reinauer, Paul Menzel, Julius Werner.
Hello build bot (Jenkins), Nico Huber, Angel Pons, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/51177
to look at the new patch set (#13).
Change subject: libpayload: Enable LTO by default ......................................................................
libpayload: Enable LTO by default
Link Time Optimization (LTO) decreases the size of the binaries, which is important for firmware with small flash ROM chip sizes. Using LTO might result in longer build times, which is not an issue for a small project like libpayload.
Therefore, enable LTO by default.
TEST=Build coreinfo without and with LTO and test with emulation/qemu-i440fx.
qemu-system-x86_64 -bios coreboot.rom -L /dev/shm -enable-kvm -smp cpus=2 -m 1G -hda /dev/shm/debian-32.img -serial stdio -net nic -net user,hostfwd=tcp::22222-:22
``` $ make -j4 # no LTO […] LPGCC coreinfo.bin /usr/bin/ld.bfd: warning: exception_asm.libc.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld.bfd: warning: build/coreinfo.bin has a LOAD segment with RWX permissions DEBUG coreinfo.debug STRIP coreinfo.elf
real 0m9,101s user 0m8,754s sys 0m1,526s $ ls -ltra build/coreinfo.{bin,debug,elf} -rwxr-xr-x 1 user user 648248 10. Nov 19:00 build/coreinfo.bin -rwxr-xr-x 1 user user 545704 10. Nov 19:00 build/coreinfo.debug -rwxr-xr-x 1 user user 130788 10. Nov 19:00 build/coreinfo.elf ```
``` $ make -j4 # with LTO […] LPGCC coreinfo.bin lto-wrapper: warning: using serial compilation of 2 LTRANS jobs lto-wrapper: note: see the '-flto' option documentation for more information /usr/bin/ld.bfd: warning: exception_asm.libc.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/ld.bfd: warning: build/coreinfo.bin has a LOAD segment with RWX permissions DEBUG coreinfo.debug STRIP coreinfo.elf
real 0m6,675s user 0m6,399s sys 0m1,395s $ ls -ltra build/coreinfo.{bin,debug,elf} -rwxr-xr-x 1 user user 616612 10. Nov 19:01 build/coreinfo.bin -rwxr-xr-x 1 user user 518340 10. Nov 19:01 build/coreinfo.debug -rwxr-xr-x 1 user user 125988 10. Nov 19:01 build/coreinfo.elf ```
So real time usage actually decreased by 33 % from nine to six seconds, and size of the ELF by 4 % from 130.8 to 126.0 bytes
Change-Id: I4bc58034ea8a9510ddc08d61d19e75a7c6f9cbc7 Signed-off-by: Paul Menzel user@molgen.mpg.de --- M payloads/libpayload/Kconfig 1 file changed, 66 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/51177/13