Skip to content

Commit a5d442f

Browse files
fvincenzoKAGA-KOKO
authored andcommitted
arm64: vdso32: Enable Clang Compilation
Enable Clang Compilation for the vdso32 library. Signed-off-by: Vincenzo Frascino <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Nathan Chancellor <[email protected]> # build Tested-by: Stephen Boyd <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Acked-by: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 8c59ab8 commit a5d442f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/arm64/kernel/vdso32/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,18 @@ include $(srctree)/lib/vdso/Makefile
1010

1111
# Same as cc-*option, but using CC_COMPAT instead of CC
1212
ifeq ($(CONFIG_CC_IS_CLANG), y)
13+
COMPAT_GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE_COMPAT)elfedit))
14+
COMPAT_GCC_TOOLCHAIN := $(realpath $(COMPAT_GCC_TOOLCHAIN_DIR)/..)
15+
16+
CC_COMPAT_CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE_COMPAT:%-=%))
17+
CC_COMPAT_CLANG_FLAGS += --prefix=$(COMPAT_GCC_TOOLCHAIN_DIR)
18+
CC_COMPAT_CLANG_FLAGS += -no-integrated-as -Qunused-arguments
19+
ifneq ($(COMPAT_GCC_TOOLCHAIN),)
20+
CC_COMPAT_CLANG_FLAGS += --gcc-toolchain=$(COMPAT_GCC_TOOLCHAIN)
21+
endif
22+
1323
CC_COMPAT ?= $(CC)
24+
CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
1425
else
1526
CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc
1627
endif

0 commit comments

Comments
 (0)