diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-05-20 13:24:07 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-05-24 14:21:30 -0400 |
commit | 94bb891e8efdd2ffbce77e78faf8c1d707d43355 (patch) | |
tree | 06e29ace488ff17e09a3a993eabf49145a98c578 /arch | |
parent | d1f81fd01598071ca9f8263dff43ac8860532f2b (diff) | |
download | u-boot-94bb891e8efdd2ffbce77e78faf8c1d707d43355.zip u-boot-94bb891e8efdd2ffbce77e78faf8c1d707d43355.tar.gz u-boot-94bb891e8efdd2ffbce77e78faf8c1d707d43355.tar.bz2 |
sandbox: make LTO available
Make LTO available for sandbox architecture.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/Kconfig | 1 | ||||
-rw-r--r-- | arch/sandbox/config.mk | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 6c4b81a..c5c03d4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -101,6 +101,7 @@ config RISCV config SANDBOX bool "Sandbox" + select ARCH_SUPPORTS_LTO select BOARD_LATE_INIT select BZIP2 select CMD_POWEROFF diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 2149771..1f8cb61 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -17,16 +17,20 @@ PLATFORM_CPPFLAGS += $(shell $(SDL_CONFIG) --cflags) endif cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \ + $(LTO_FINAL_LDFLAGS) \ -Wl,--whole-archive \ $(u-boot-main) \ + $(u-boot-keep-syms-lto) \ -Wl,--no-whole-archive \ $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map cmd_u-boot-spl = (cd $(obj) && $(CC) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \ + $(LTO_FINAL_LDFLAGS) \ $(patsubst $(obj)/%,%,$(u-boot-spl-init)) \ -Wl,--whole-archive \ $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \ $(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) \ + $(patsubst $(obj)/%,%,$(u-boot-spl-keep-syms-lto)) \ -Wl,--no-whole-archive \ $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot-spl.map -Wl,--gc-sections) |