From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgDSUVp (ORCPT ); Sun, 19 Apr 2020 16:21:45 -0400 From: Nathan Chancellor Subject: [PATCH v2 1/3] kbuild: add CONFIG_LD_IS_LLD Date: Sun, 19 Apr 2020 13:21:26 -0700 Message-Id: <20200419202128.20571-1-natechancellor@gmail.com> In-Reply-To: <20200419180445.26722-1-natechancellor@gmail.com> References: <20200419180445.26722-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Thomas Bogendoerfer , Masahiro Yamada Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, Nick Desaulniers , Sami Tolvanen , Dmitry Golovin , Sedat Dilek , Nathan Chancellor From: Sami Tolvanen 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 [nc: Reword commit message] Signed-off-by: Nathan Chancellor --- v1 -> v2: * No changes. Sami, please scream if you are unhappy with how I worded this commit. init/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index 9e22ee8fbd75..c15ee42b8272 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -23,6 +23,9 @@ config LD_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)) base-commit: 50cc09c18985eacbbd666acfd7be2391394733f5 -- 2.26.1