summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-11 13:23:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-11 13:23:07 -0400
commite5337178f7023bd06a39c06e1fab88817559c0f3 (patch)
tree04e9e9a0c674e0f9bab9102d02c269177406ac5c /Makefile
parent834d3cd294abd9ad81c6cbaefdda28aa491ceb06 (diff)
parent5318321d367c21ca1fe9eb00caefc239c938750a (diff)
Merge tag 'kbuild-fixes-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Masahiro writes: "Kbuild fixes for v4.19 (2nd) - Fix warnings from recordmcount.pl when building with Clang - Allow Clang to use GNU toolchains correctly - Disable CONFIG_SAMPLES for UML to avoid build error" * tag 'kbuild-fixes-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: samples: disable CONFIG_SAMPLES for UML kbuild: allow to use GCC toolchain not in Clang search path ftrace: Build with CPPFLAGS to get -Qunused-arguments
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9b2df076885a..e8b599b4dcde 100644
--- a/Makefile
+++ b/Makefile
@@ -483,13 +483,15 @@ endif
483ifeq ($(cc-name),clang) 483ifeq ($(cc-name),clang)
484ifneq ($(CROSS_COMPILE),) 484ifneq ($(CROSS_COMPILE),)
485CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) 485CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%))
486GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) 486GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
487CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR)
488GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
487endif 489endif
488ifneq ($(GCC_TOOLCHAIN),) 490ifneq ($(GCC_TOOLCHAIN),)
489CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) 491CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN)
490endif 492endif
491KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) 493KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
492KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) 494KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
493KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) 495KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
494KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) 496KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
495endif 497endif