]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: fix LTO build for some thumb-interwork cases
authorMarek Behún <marek.behun@nic.cz>
Thu, 20 May 2021 11:24:11 +0000 (13:24 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 24 May 2021 18:21:30 +0000 (14:21 -0400)
Fix LTO build for some thumb-interwork usecases (such as for
da850evm_defconfig), where inline assmebly such as
  mrc p15,0,r2,c1,c0,0
causes the compiler to fail during LTO linking with
  Error: selected processor does not support `mrc p15,0,r2,c1,c0,0'
         in Thumb mode

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

index af63d5cc5ef3fa071d01f89a931e756cde67ea75..98aafe805a225248968d4dc0d240570584dae25e 100644 (file)
@@ -25,6 +25,8 @@ ifndef CONFIG_HAS_THUMB2
 
 CFLAGS_cpu.o := -marm
 CFLAGS_cache.o := -marm
+CFLAGS_REMOVE_cpu.o := $(LTO_CFLAGS)
+CFLAGS_REMOVE_cache.o := $(LTO_CFLAGS)
 
 endif
 endif
index 27b12e7f2bb97685306b3aa7f3f78afe05550694..61bef1d5af3f5c11f80d8d66ba2bae53917701f4 100644 (file)
@@ -64,6 +64,7 @@ endif
 
 obj-y  += cache.o
 obj-$(CONFIG_SYS_ARM_CACHE_CP15)       += cache-cp15.o
+CFLAGS_REMOVE_cache-cp15.o := $(LTO_CFLAGS)
 
 obj-y  += psci-dt.o