summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/vdso32/Makefile
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2019-10-04 15:43:53 +0100
committerWill Deacon <will@kernel.org>2019-10-07 13:32:02 +0100
commitbcaf9b57e4884e86717c1f4cee8157fd68189aa7 (patch)
treea5f8980941d74fa72ac82c3af1682c0922c3b349 /arch/arm64/kernel/vdso32/Makefile
parent24ee01a927bfe56c66429ec4b1df6955a814adc8 (diff)
downloadlinux-bcaf9b57e4884e86717c1f4cee8157fd68189aa7.tar.bz2
arm64: vdso32: Move definition of COMPATCC into vdso32/Makefile
There's no need to export COMPATCC, so just define it locally in the vdso32/Makefile, which is the only place where it is used. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/vdso32/Makefile')
-rw-r--r--arch/arm64/kernel/vdso32/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index 038357a1e835..f52d29027d8d 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -9,6 +9,12 @@ ARCH_REL_TYPE_ABS := R_ARM_JUMP_SLOT|R_ARM_GLOB_DAT|R_ARM_ABS32
include $(srctree)/lib/vdso/Makefile
# Same as cc-*option, but using COMPATCC instead of CC
+ifeq ($(CONFIG_CC_IS_CLANG), y)
+COMPATCC ?= $(CC) --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
+else
+COMPATCC ?= $(CROSS_COMPILE_COMPAT)gcc
+endif
+
cc32-option = $(call try-run,\
$(COMPATCC) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
cc32-disable-warning = $(call try-run,\