From 4459f07e133092d27270f45aa7da8e1d8eb45bb4 Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Fri, 4 Oct 2019 15:43:53 +0100 Subject: [PATCH] UPSTREAM: 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 Signed-off-by: Will Deacon (cherry picked from commit bcaf9b57e4884e86717c1f4cee8157fd68189aa7) Signed-off-by: Mark Salyzyn Bug: 154668398 Change-Id: Id9eb2cfe1e13a6858f42c8ff025bb5fc9bf096a7 --- arch/arm64/Makefile | 7 ------- arch/arm64/kernel/vdso32/Makefile | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 0495b2f5ab89..f502570c6159 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -49,13 +49,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 diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 3e588e20320b..78be502c3dd9 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,\