From: Marek BehĂșn Date: Thu, 20 May 2021 11:24:22 +0000 (+0200) Subject: ARM: make LTO available X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=8f9696510afc2b52ebeba5d1db4883cf3331c206;p=u-boot.git ARM: make LTO available Make LTO available for ARM architecture. Signed-off-by: Marek BehĂșn Reviewed-by: Simon Glass --- diff --git a/arch/Kconfig b/arch/Kconfig index 8fd39e36b4..49813a4c9b 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -33,6 +33,7 @@ config ARC config ARM bool "ARM architecture" + select ARCH_SUPPORTS_LTO select CREATE_ARCH_SYMLINK select HAVE_PRIVATE_LIBGCC if !ARM64 select SUPPORT_OF_CONTROL diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 61bef1d5af..7f66332715 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -45,6 +45,8 @@ obj-$(CONFIG_SEMIHOSTING) += semihosting.o obj-y += bdinfo.o obj-y += sections.o +CFLAGS_REMOVE_sections.o := $(LTO_CFLAGS) + obj-y += stack.o ifdef CONFIG_CPU_V7M obj-y += interrupts_m.o