diff options
author | Alexander Lobakin <alobakin@pm.me> | 2021-01-21 19:45:55 +0100 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2021-02-17 19:10:37 +0100 |
commit | 2b8689520520175075ca97bc4eaf51ff3f7253aa (patch) | |
tree | 8aca8ffa3b7dc1b7b46828b73e6232fbf43eba0c /tools/objtool/check.c | |
parent | arm64: allow LTO to be selected (diff) | |
download | linux-2b8689520520175075ca97bc4eaf51ff3f7253aa.tar.xz linux-2b8689520520175075ca97bc4eaf51ff3f7253aa.zip |
kbuild: prevent CC_FLAGS_LTO self-bloating on recursive rebuilds
CC_FLAGS_LTO gets initialized only via +=, never with := or =.
When building with CONFIG_TRIM_UNUSED_KSYMS, Kbuild may perform
several kernel rebuilds to satisfy symbol dependencies. In this
case, value of CC_FLAGS_LTO is concatenated each time, which
triggers a full rebuild.
Initialize it with := to fix this.
Fixes: dc5723b02e52 ("kbuild: add support for Clang LTO")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210121184544.659998-1-alobakin@pm.me
Diffstat (limited to 'tools/objtool/check.c')
0 files changed, 0 insertions, 0 deletions