diff options
| author | Masahiro Yamada <[email protected]> | 2019-07-29 09:15:17 +0000 |
|---|---|---|
| committer | Masahiro Yamada <[email protected]> | 2019-07-30 16:00:58 +0000 |
| commit | 5241ab4cf42d3a93b933b55d3d53f43049081fa1 (patch) | |
| tree | 2af50c0e6f72de941b0dc130d7342b2556555750 /scripts/gen_compile_commands.py | |
| parent | kbuild: detect missing "WITH Linux-syscall-note" for uapi headers (diff) | |
| download | kernel-5241ab4cf42d3a93b933b55d3d53f43049081fa1.tar.gz kernel-5241ab4cf42d3a93b933b55d3d53f43049081fa1.zip | |
kbuild: initialize CLANG_FLAGS correctly in the top Makefile
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: <[email protected]> # v5.0+
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Acked-by: Nick Desaulniers <[email protected]>
Diffstat (limited to 'scripts/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions
