arm64: vdso32: Move definition of COMPATCC into vdso32/Makefile
authorWill Deacon <will@kernel.org>
Fri, 4 Oct 2019 14:43:53 +0000 (15:43 +0100)
committerWill Deacon <will@kernel.org>
Mon, 7 Oct 2019 12:32:02 +0000 (13:32 +0100)
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>
arch/arm64/Makefile
arch/arm64/kernel/vdso32/Makefile

index 12229cc..34f53eb 100644 (file)
@@ -53,13 +53,6 @@ $(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)
   export CONFIG_COMPAT_VDSO := y
   compat_vdso := -DCONFIG_COMPAT_VDSO=1
index 038357a..f52d290 100644 (file)
@@ -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,\