From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDAC4C433F5 for ; Thu, 10 Mar 2022 14:26:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243803AbiCJO10 (ORCPT ); Thu, 10 Mar 2022 09:27:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243556AbiCJO0j (ORCPT ); Thu, 10 Mar 2022 09:26:39 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAAE4153386; Thu, 10 Mar 2022 06:22:24 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A4C99B82615; Thu, 10 Mar 2022 14:22:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EFE1C340EB; Thu, 10 Mar 2022 14:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646922141; bh=cjHyVjWNJsQxuVowu7ZdDd9SkwUhowekV4P8pdY23P0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KHiRHK/t5Rx1DcPyJMlRDDLVRXiCP1oAfvyR5qIvd4EH+Qp0+al4J9n3gs/OH5Evo O4R2eNiRE7KQ5s3FqHlsONIl6gXRMFAD3GPn+g/zn9DsatKIhIFkFoRSrC9u9yDzNf hTJojbG0BadObTsILEEGa8kZBQkL/B+ZPuZzt1m0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sami Tolvanen , Masahiro Yamada , Nathan Chancellor , Sedat Dilek , Thomas Bogendoerfer Subject: [PATCH 4.19 19/33] kbuild: add CONFIG_LD_IS_LLD Date: Thu, 10 Mar 2022 15:18:46 +0100 Message-Id: <20220310140808.311513696@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220310140807.749164737@linuxfoundation.org> References: <20220310140807.749164737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Sami Tolvanen 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 --- init/Kconfig | 3 +++ 1 file changed, 3 insertions(+) --- 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))