summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2019-10-04 15:44:45 +0100
committerBruno Martins <bgcngm@gmail.com>2023-10-27 15:56:17 +0100
commit921297f341fcbf16762eade007c9e3456f4881fe (patch)
tree88ffa9ff509dbfe00700e12b4fe34c848d551671
parent000406a64080997233971f02ae9b81df6a9813f2 (diff)
arm64: vdso32: Don't use KBUILD_CPPFLAGS unconditionally
KBUILD_CPPFLAGS is defined differently depending on whether the main compiler is clang or not. This means that it is not possible to build the compat vDSO with GCC if the rest of the kernel is built with clang. Define VDSO_CPPFLAGS directly to break this dependency and allow a clang kernel to build a compat vDSO with GCC: $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \ CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- CC=clang \ COMPATCC=arm-linux-gnueabihf-gcc Acked-by: Catalin Marinas <catalin.marinas@arm.com> Change-Id: Iaa7f6197bc99ca5c8162c6e34e3dd38c31d894cd Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r--arch/arm64/kernel/vdso32/Makefile8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index e2ff3b6b676a..47c83312f011 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -29,13 +29,9 @@ cc32-ldoption = $(call try-run,\
# arm64 one.
# As a result we set our own flags here.
-# From top-level Makefile
-# NOSTDINC_FLAGS
-VDSO_CPPFLAGS := -nostdinc -isystem $(shell $(CC_ARM32) -print-file-name=include)
+# KBUILD_CPPFLAGS and NOSTDINC_FLAGS from top-level Makefile
+VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc -isystem $(shell $(CC_ARM32) -print-file-name=include)
VDSO_CPPFLAGS += $(LINUXINCLUDE)
-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