[PATCH u-boot v3 28/39] ARM: fix LTO for keystone

Marek Behún
2021-03-16T12:25:58Z

When building keystone with LTO the compiler complains:
Error: selected processor does not support `smc #0' in Thumb mode

Fix this by removing -flto for the file implementing these SMC calls.

Signed-off-by: Marek Beh?n <marek.behun@nic.cz>
---
arch/arm/mach-keystone/Makefile | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-keystone/Makefile b/arch/arm/mach-keystone/Makefile
index 3e076e12ec..6c7c25090a 100644
--- a/arch/arm/mach-keystone/Makefile
+++ b/arch/arm/mach-keystone/Makefile
@@ -9,6 +9,7 @@ obj-y += init.o
obj-y += psc.o
obj-y += clock.o
obj-y += mon.o
+CFLAGS_REMOVE_mon.o := $(LTO_CFLAGS)
ifndef CONFIG_SPL_BUILD
obj-y += cmd_clock.o
obj-y += cmd_mon.o
--
2.26.2