arm64: vdso32: Don't use KBUILD_CPPFLAGS unconditionally
authorWill Deacon <will@kernel.org>
Fri, 4 Oct 2019 14:44:45 +0000 (15:44 +0100)
committerBruno Martins <bgcngm@gmail.com>
Sun, 22 Oct 2023 14:12:33 +0000 (15:12 +0100)
commit99bae2602fc81f88527301aedbb8bb804d082000
treee6ad28465a1b9ed01c9a7faa86f0330cfcaf4860
parent2f704505c8536fc038994d71f862bcfd8da6b822
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>
arch/arm64/kernel/vdso32/Makefile