|
@@ -599,20 +599,7 @@ endif
|
|
CC_VERSION_TEXT = $(subst $(pound),,$(shell LC_ALL=C $(CC) --version 2>/dev/null | head -n 1))
|
|
CC_VERSION_TEXT = $(subst $(pound),,$(shell LC_ALL=C $(CC) --version 2>/dev/null | head -n 1))
|
|
|
|
|
|
ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
|
|
ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
|
|
-ifneq ($(CROSS_COMPILE),)
|
|
|
|
-CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
|
|
|
|
-endif
|
|
|
|
-ifeq ($(LLVM_IAS),1)
|
|
|
|
-CLANG_FLAGS += -fintegrated-as
|
|
|
|
-else
|
|
|
|
-CLANG_FLAGS += -fno-integrated-as
|
|
|
|
-GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
|
|
|
-CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE))
|
|
|
|
-endif
|
|
|
|
-CLANG_FLAGS += -Werror=unknown-warning-option
|
|
|
|
-KBUILD_CFLAGS += $(CLANG_FLAGS)
|
|
|
|
-KBUILD_AFLAGS += $(CLANG_FLAGS)
|
|
|
|
-export CLANG_FLAGS
|
|
|
|
|
|
+include $(srctree)/scripts/Makefile.clang
|
|
endif
|
|
endif
|
|
|
|
|
|
# Include this also for config targets because some architectures need
|
|
# Include this also for config targets because some architectures need
|