File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,18 @@ include $(srctree)/lib/vdso/Makefile
10
10
11
11
# Same as cc-*option, but using CC_COMPAT instead of CC
12
12
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
+
13
23
CC_COMPAT ?= $(CC )
24
+ CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS )
14
25
else
15
26
CC_COMPAT ?= $(CROSS_COMPILE_COMPAT ) gcc
16
27
endif
You can’t perform that action at this time.
0 commit comments