]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: make LTO available
authorMarek Behún <marek.behun@nic.cz>
Thu, 20 May 2021 11:24:22 +0000 (13:24 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 24 May 2021 18:21:30 +0000 (14:21 -0400)
Make LTO available for ARM architecture.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/Kconfig
arch/arm/lib/Makefile

index 8fd39e36b452beff899369a42b3d127e803f9251..49813a4c9b88e7b7a85a1487bc61f886e79af975 100644 (file)
@@ -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
index 61bef1d5af3f5c11f80d8d66ba2bae53917701f4..7f663327151874e8fe93c557c1d9c095416d2f90 100644 (file)
@@ -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