aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--Makefile8
-rw-r--r--samples/Kconfig1
-rw-r--r--scripts/Makefile.build2
3 files changed, 7 insertions, 4 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
diff --git a/samples/Kconfig b/samples/Kconfig
index bd133efc1a56..ad1ec7016d4c 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -1,5 +1,6 @@
1menuconfig SAMPLES 1menuconfig SAMPLES
2 bool "Sample kernel code" 2 bool "Sample kernel code"
3 depends on !UML
3 help 4 help
4 You can build and test sample kernel code here. 5 You can build and test sample kernel code here.
5 6
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5a2d1c9578a0..54da4b070db3 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -219,7 +219,7 @@ else
219sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ 219sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
220 "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ 220 "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
221 "$(if $(CONFIG_64BIT),64,32)" \ 221 "$(if $(CONFIG_64BIT),64,32)" \
222 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ 222 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)" \
223 "$(LD) $(KBUILD_LDFLAGS)" "$(NM)" "$(RM)" "$(MV)" \ 223 "$(LD) $(KBUILD_LDFLAGS)" "$(NM)" "$(RM)" "$(MV)" \
224 "$(if $(part-of-module),1,0)" "$(@)"; 224 "$(if $(part-of-module),1,0)" "$(@)";
225recordmcount_source := $(srctree)/scripts/recordmcount.pl 225recordmcount_source := $(srctree)/scripts/recordmcount.pl