Jacob Garber uploaded patch set #4 to this change.

View Change

[TEST] Add support for link time optimization

- Code generation is not done until after linking, so the
compiler must be invoked at all linking stages instead of the linker. As
a consequence all linker arguments must be prefixed with -Wl.
- Partial linking is not supported. Instead, object files are collected
into thin archives that are linked instead.
- Wrapping libgcc functions causes a symbol mismatch when using LTO.
Wrapping these functions was originally done to support alternate
regparam values, though AFAICT this isn't used anywhere.

Using LTO leads to a ~10% decrease in stage size for QEMU and ~18% for
the Thinkpad T500, and both targets boot successfully.

Change-Id: I48c31ea8b1b57276125cffdac44c7c16642547ac
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
---
M Makefile.inc
M src/Kconfig
M src/arch/arm/Makefile.inc
M src/arch/arm64/Makefile.inc
M src/arch/ppc64/Makefile.inc
M src/arch/riscv/Makefile.inc
M src/arch/x86/Makefile.inc
M src/cpu/x86/smm/Makefile.inc
M src/lib/Makefile.inc
M src/lib/gcc.c
M toolchain.inc
M util/xcompile/xcompile
12 files changed, 61 insertions(+), 44 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/38989/4

To view, visit change 38989. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I48c31ea8b1b57276125cffdac44c7c16642547ac
Gerrit-Change-Number: 38989
Gerrit-PatchSet: 4
Gerrit-Owner: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Philipp Hug <philipp@hug.cx>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: ron minnich <rminnich@gmail.com>
Gerrit-CC: Julius Werner <jwerner@chromium.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: newpatchset