diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-11 13:23:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-11 13:23:07 -0400 |
commit | e5337178f7023bd06a39c06e1fab88817559c0f3 (patch) | |
tree | 04e9e9a0c674e0f9bab9102d02c269177406ac5c /Makefile | |
parent | 834d3cd294abd9ad81c6cbaefdda28aa491ceb06 (diff) | |
parent | 5318321d367c21ca1fe9eb00caefc239c938750a (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-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -483,13 +483,15 @@ endif | |||
483 | ifeq ($(cc-name),clang) | 483 | ifeq ($(cc-name),clang) |
484 | ifneq ($(CROSS_COMPILE),) | 484 | ifneq ($(CROSS_COMPILE),) |
485 | CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) | 485 | CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) |
486 | GCC_TOOLCHAIN := $(realpath $(dir $(shell which $(LD)))/..) | 486 | GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) |
487 | CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR) | ||
488 | GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) | ||
487 | endif | 489 | endif |
488 | ifneq ($(GCC_TOOLCHAIN),) | 490 | ifneq ($(GCC_TOOLCHAIN),) |
489 | CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) | 491 | CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) |
490 | endif | 492 | endif |
491 | KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) | 493 | KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) |
492 | KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) | 494 | KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX) |
493 | KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) | 495 | KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) |
494 | KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) | 496 | KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) |
495 | endif | 497 | endif |