From 16df258295af4cdbd65e6650de17dcae12d64040 Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Fri, 4 Oct 2019 14:08:13 +0100 Subject: [PATCH] UPSTREAM: arm64: Default to building compat vDSO with clang when CONFIG_CC_IS_CLANG Rather than force the use of GCC for the compat cross-compiler, instead extract the target from CROSS_COMPILE_COMPAT and pass it to clang if the main compiler is clang. Acked-by: Catalin Marinas Signed-off-by: Will Deacon (cherry picked from commit 24ee01a927bfe56c66429ec4b1df6955a814adc8) Signed-off-by: Mark Salyzyn Bug: 154668398 Change-Id: I66ffadbc63519d9d97557335a4050d8c33233b5b --- arch/arm64/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 2ac874fb11c2..0495b2f5ab89 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -49,7 +49,11 @@ $(warning Detected assembler with broken .inst; disassembly will be unreliable) endif endif +ifeq ($(CONFIG_CC_IS_CLANG), y) +COMPATCC ?= $(CC) --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%)) +else COMPATCC ?= $(CROSS_COMPILE_COMPAT)gcc +endif export COMPATCC ifeq ($(CONFIG_GENERIC_COMPAT_VDSO), y)