diff mbox series

[u-boot,v4,25/36] ARM: fix LTO for keystone

Message ID 20210520112425.25166-26-marek.behun@nic.cz
State Accepted
Commit 9493e96e54eafa67df9b4f26e4cca4b68d167dbb
Delegated to: Tom Rini
Headers show
Series U-Boot LTO (Sandbox + Some ARM boards) | expand

Commit Message

Marek Behún May 20, 2021, 11:24 a.m. UTC
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(+)

Comments

Tom Rini May 25, 2021, 12:56 a.m. UTC | #1
On Thu, May 20, 2021 at 01:24:14PM +0200, Marek Behún wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

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