Commit c71e88c4 authored by Will Deacon's avatar Will Deacon

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: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent bcaf9b57
...@@ -31,11 +31,9 @@ cc32-as-instr = $(call try-run,\ ...@@ -31,11 +31,9 @@ cc32-as-instr = $(call try-run,\
# arm64 one. # arm64 one.
# As a result we set our own flags here. # As a result we set our own flags here.
# From top-level Makefile # KBUILD_CPPFLAGS and NOSTDINC_FLAGS from top-level Makefile
# NOSTDINC_FLAGS VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc -isystem $(shell $(COMPATCC) -print-file-name=include)
VDSO_CPPFLAGS := -nostdinc -isystem $(shell $(COMPATCC) -print-file-name=include)
VDSO_CPPFLAGS += $(LINUXINCLUDE) VDSO_CPPFLAGS += $(LINUXINCLUDE)
VDSO_CPPFLAGS += $(KBUILD_CPPFLAGS)
# Common C and assembly flags # Common C and assembly flags
# From top-level Makefile # From top-level Makefile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment