Commit cd4cdf5e authored by Behan Webster's avatar Behan Webster
Browse files

kbuild, LLVMLinux: Add better clang cross build support



Add cross target to CC if using clang. Also add custom gcc toolchain path for
fallback gcc tools.

Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
parent faaab795
......@@ -349,7 +349,16 @@ include $(srctree)/scripts/Kbuild.include
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
ifeq ($(COMPILER),clang)
ifneq ($(CROSS_COMPILE),)
CC += -target $(CROSS_COMPILE:%-=%)
endif
ifneq ($(GCC_TOOLCHAIN),)
CC += -gcc-toolchain $(GCC_TOOLCHAIN)
endif
else
CC = $(CROSS_COMPILE)gcc
endif
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
......
Supports Markdown
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