kbuild: Disable CONFIG_LD_ORPHAN_WARN for ld.lld 10.0.1
ld.lld 10.0.1 spews a bunch of various warnings about .rela sections, along with a few others. Newer versions of ld.lld do not have these warnings. As a result, do not add '--orphan-handling=warn' to LDFLAGS_vmlinux if ld.lld's version is not new enough. Link: https://github.com/ClangBuiltLinux/linux/issues/1187 Link: https://github.com/ClangBuiltLinux/linux/issues/1193 Reported-by: Arvind Sankar <nivedita@alum.mit.edu> Reported-by: kernelci.org bot <bot@kernelci.org> Reported-by: Mark Brown <broonie@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:

committed by
Masahiro Yamada

parent
59612b24f7
commit
d5750cd3c5
@@ -47,6 +47,10 @@ config CLANG_VERSION
|
||||
int
|
||||
default $(shell,$(srctree)/scripts/clang-version.sh $(CC))
|
||||
|
||||
config LLD_VERSION
|
||||
int
|
||||
default $(shell,$(srctree)/scripts/lld-version.sh $(LD))
|
||||
|
||||
config CC_CAN_LINK
|
||||
bool
|
||||
default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag)) if 64BIT
|
||||
@@ -1351,6 +1355,7 @@ config LD_DEAD_CODE_DATA_ELIMINATION
|
||||
config LD_ORPHAN_WARN
|
||||
def_bool y
|
||||
depends on ARCH_WANT_LD_ORPHAN_WARN
|
||||
depends on !LD_IS_LLD || LLD_VERSION >= 110000
|
||||
depends on $(ld-option,--orphan-handling=warn)
|
||||
|
||||
config SYSCTL
|
||||
|
Reference in New Issue
Block a user