From: Mark Salyzyn Date: Wed, 10 Jan 2018 00:55:17 +0000 (-0800) Subject: ANDROID: arm64: vdso32: fix CC=clang build X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc523dd4fa91fb3269d29243be794df6a77ada25;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ANDROID: arm64: vdso32: fix CC=clang build clang build had wrong --gcc-toolchain for cross compiler. Signed-off-by: Mark Salyzyn Bug: 63737556 Change-Id: Ib0c3bbb250943a0309da021ba5335a8320b584f4 --- diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index 6d44d972e89d..e9ca1f97a543 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -6,6 +6,10 @@ ifeq ($(cc-name),clang) CC_ARM32 := $(cc-name) $(CLANG_TARGET_ARM32) -no-integrated-as + GCC_ARM32_TC := $(realpath $(dir $(shell which $(CROSS_COMPILE_ARM32)ld))/..) +ifneq ($(GCC_ARM32_TC),) + CC_ARM32 += --gcc-toolchain=$(GCC_ARM32_TC) +endif else CC_ARM32 := $(CROSS_COMPILE_ARM32)$(cc-name) endif @@ -29,7 +33,9 @@ cc32-ldoption = $(call try-run,\ # NOSTDINC_FLAGS VDSO_CPPFLAGS := -nostdinc -isystem $(shell $(CC_ARM32) -print-file-name=include) VDSO_CPPFLAGS += $(LINUXINCLUDE) -VDSO_CPPFLAGS += $(KBUILD_CPPFLAGS) +VDSO_CPPFLAGS += -D__KERNEL__ +VDSO_CPPFLAGS += $(call cc-option,-Qunused-arguments,) +VDSO_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS) # Common C and assembly flags # From top-level Makefile