diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-07-29 18:15:17 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-06 19:06:53 +0200 |
commit | 4c5a442561e86933b656b5357da43c5967f5c91f (patch) | |
tree | 8778d30dfc74d0da3661b1041921af2b794039c0 /init | |
parent | 3736612d25828351cc74ac3cdf3d582c194963d1 (diff) | |
download | linux-stable-4c5a442561e86933b656b5357da43c5967f5c91f.tar.gz linux-stable-4c5a442561e86933b656b5357da43c5967f5c91f.tar.bz2 linux-stable-4c5a442561e86933b656b5357da43c5967f5c91f.zip |
kbuild: initialize CLANG_FLAGS correctly in the top Makefile
commit 5241ab4cf42d3a93b933b55d3d53f43049081fa1 upstream.
CLANG_FLAGS is initialized by the following line:
CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%))
..., which is run only when CROSS_COMPILE is set.
Some build targets (bindeb-pkg etc.) recurse to the top Makefile.
When you build the kernel with Clang but without CROSS_COMPILE,
the same compiler flags such as -no-integrated-as are accumulated
into CLANG_FLAGS.
If you run 'make CC=clang' and then 'make CC=clang bindeb-pkg',
Kbuild will recompile everything needlessly due to the build command
change.
Fix this by correctly initializing CLANG_FLAGS.
Fixes: 238bcbc4e07f ("kbuild: consolidate Clang compiler flags")
Cc: <stable@vger.kernel.org> # v5.0+
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions