Commit e11b323b authored by Alexander Lobakin's avatar Alexander Lobakin Committed by Connor O'Brien
Browse files

UPSTREAM: 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: dc5723b0 ("kbuild: add support for Clang LTO")
Signed-off-by: default avatarAlexander Lobakin <alobakin@pm.me>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210121184544.659998-1-alobakin@pm.me


(cherry picked from commit 2b868952)
Bug: 187129171
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
Change-Id: Id12534c0bfaec21e72b534a5a032161ff4606c73
parent 631b4dba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment