aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2019-10-04 14:08:13 +0100
committerWill Deacon <will@kernel.org>2019-10-07 13:31:45 +0100
commit24ee01a927bfe56c66429ec4b1df6955a814adc8 (patch)
tree42d6b9a4826313a83bda21beb5b3ec7df5fbce53 /arch
parentlib: vdso: Remove CROSS_COMPILE_COMPAT_VDSO (diff)
downloadlinux-dev-24ee01a927bfe56c66429ec4b1df6955a814adc8.tar.xz
linux-dev-24ee01a927bfe56c66429ec4b1df6955a814adc8.zip
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 <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index dfa6a5cb99e4..12229cc5d908 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -53,7 +53,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)