From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Wed, 3 Mar 2021 05:12:06 +0100 Subject: [RFC PATCH u-boot 07/12] arch: sandbox: make LTO available In-Reply-To: <20210303041211.26945-1-marek.behun@nic.cz> References: <20210303041211.26945-1-marek.behun@nic.cz> Message-ID: <20210303041211.26945-8-marek.behun@nic.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Make LTO available for sandbox architecture. Signed-off-by: Marek Beh?n --- arch/Kconfig | 1 + arch/sandbox/config.mk | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 27843cd79c..a6dab3e56d 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 ebbb094744..d9c430794e 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -16,11 +16,11 @@ PLATFORM_LIBS += $(shell $(SDL_CONFIG) --libs) PLATFORM_CPPFLAGS += $(shell $(SDL_CONFIG) --cflags) endif -cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \ +cmd_u-boot__ = $(CC) $(LTO_FINAL_CFLAGS) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \ -Wl,--whole-archive $(u-boot-main) -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 \ +cmd_u-boot-spl = (cd $(obj) && $(CC) $(LTO_FINAL_CFLAGS) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \ $(patsubst $(obj)/%,%,$(u-boot-spl-init)) \ -Wl,--whole-archive $(patsubst $(obj)/%,%,$(u-boot-spl-main)) -Wl,--no-whole-archive \ -Wl,--start-group $(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) -Wl,--end-group \ -- 2.26.2