From: Sami Tolvanen Date: Tue, 28 Apr 2020 22:14:15 +0000 (-0700) Subject: kbuild: add CONFIG_LD_IS_LLD X-Git-Tag: v4.19.234~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=594de64394b45200cefe25aeab3ad0ac88c451a4;p=thirdparty%2Fkernel%2Fstable.git 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 Acked-by: Masahiro Yamada [nc: Reword commit message] Signed-off-by: Nathan Chancellor Tested-by: Sedat Dilek Reviewed-by: Sedat Dilek Signed-off-by: Thomas Bogendoerfer Signed-off-by: Greg Kroah-Hartman --- diff --git a/init/Kconfig b/init/Kconfig index 0fe4f60c974d7..15c02e15d3fd4 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))