summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2020-04-28 15:14:15 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-11 10:15:12 +0100
commit594de64394b45200cefe25aeab3ad0ac88c451a4 (patch)
tree8948e4f307d989735377b5dcc18e8e63ec452dbf /init
parentfffcf80d055c4f619ae9cd8bf3a8b67319317100 (diff)
downloadlinux-594de64394b45200cefe25aeab3ad0ac88c451a4.tar.gz
linux-594de64394b45200cefe25aeab3ad0ac88c451a4.tar.bz2
linux-594de64394b45200cefe25aeab3ad0ac88c451a4.zip
kbuild: add CONFIG_LD_IS_LLD
commit b744b43f79cc758127042e71f9ad7b1afda30f84 upstream. Similarly to the CC_IS_CLANG config, add LD_IS_LLD to avoid GNU ld specific logic such as ld-version or ld-ifversion and gain the ability to select potential features that depend on the linker at configuration time such as LTO. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Acked-by: Masahiro Yamada <masahiroy@kernel.org> [nc: Reword commit message] Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Reviewed-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 0fe4f60c974d..15c02e15d3fd 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -19,6 +19,9 @@ config GCC_VERSION
config CC_IS_CLANG
def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
+config LD_IS_LLD
+ def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD)
+
config CLANG_VERSION
int
default $(shell,$(srctree)/scripts/clang-version.sh $(CC))