mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
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:
parent
59612b24f7
commit
d5750cd3c5
3 changed files with 26 additions and 0 deletions
20
scripts/lld-version.sh
Executable file
20
scripts/lld-version.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Usage: $ ./scripts/lld-version.sh ld.lld
|
||||
#
|
||||
# Print the linker version of `ld.lld' in a 5 or 6-digit form
|
||||
# such as `100001' for ld.lld 10.0.1 etc.
|
||||
|
||||
linker_string="$($* --version)"
|
||||
|
||||
if ! ( echo $linker_string | grep -q LLD ); then
|
||||
echo 0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION=$(echo $linker_string | cut -d ' ' -f 2)
|
||||
MAJOR=$(echo $VERSION | cut -d . -f 1)
|
||||
MINOR=$(echo $VERSION | cut -d . -f 2)
|
||||
PATCHLEVEL=$(echo $VERSION | cut -d . -f 3)
|
||||
printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
|
Loading…
Add table
Add a link
Reference in a new issue