From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Thu, 4 Mar 2021 08:07:13 +0100 Subject: [PATCH] arm: fix LTO build for some thumb-interwork cases In-Reply-To: Message-ID: <20210304070713.32002-1-marek.behun@nic.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- arch/arm/cpu/arm926ejs/Makefile | 2 ++ arch/arm/lib/Makefile | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/Makefile b/arch/arm/cpu/arm926ejs/Makefile index af63d5cc5e..98aafe805a 100644 --- a/arch/arm/cpu/arm926ejs/Makefile +++ b/arch/arm/cpu/arm926ejs/Makefile @@ -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 diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index e977aacc61..7f66332715 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -66,6 +66,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 -- 2.26.2