From patchwork Fri Jun 25 07:48:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 12343973 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90DF2C2B9F4 for ; Fri, 25 Jun 2021 08:20:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 61FD36141C for ; Fri, 25 Jun 2021 08:20:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61FD36141C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=synaptics.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gjPiXEawWlsRhX/z4OFXjcev/7KGH6rt3LwlPX2UHx4=; b=bInWyeVo11hjRa yVvOD6Y4HQbJhlkTJyVy9taUXBNikIN545zIkOcWWyePgnSTd37QeyOaA/a9iJrZfkun3FHfXFLIY X1XIkknZpYFr1oY3Lwp6CNzLLEt01o15v6iwk19a+tWjbiMCjvIHGZfqZqld8ZJuSrkyW8TQBLr35 /OMrle5K8fiBiQOxbLie31TQFo36uEWACD0mUxrAiJxoSqnQtwJPWICtoG/FU/AZnYGC10I2Aci0s ioOTu4VHrKIRkSVhRSBH2/EfovplWY6byIlPz/ClJQnCDRffhKe+3emYFsu0wjGlOUEyAi6BsPirb zoCVEUapOz+mCk/BZkwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwh2f-000Gfy-Bo; Fri, 25 Jun 2021 08:18:28 +0000 Received: from mail-bn8nam12on2080.outbound.protection.outlook.com ([40.107.237.80] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwgiN-000AUg-E1 for linux-arm-kernel@lists.infradead.org; Fri, 25 Jun 2021 07:57:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=flvy7FDreesEZSxtG0dP5lfbzpaHVQk0F6YeljljebNNgTvlUjNI8c+DlqX2wJ6BLODJ5bNkX1HulaQQB9kDQWd5AmgmQmmQ+0GqDcI8zJrfhLoriPSq0cxbY1UHZ0Hgk9MuLw1dLdGM3lCKsSZAJDniD9xyr1TqMLofvCLjNGayJl//fX+r3/KVYEuUVYD2tIxqOGwnihiAa+BSfCgWVUI0QRUDUslSjARuhrvSHi/mrezVMWqpVKVF9V88I9uhPwadgGZoNzFroEToeQJHq2Z9lEbgPYNoB1oyBf0U+cW/qCQ3EtCXfi8q77h0oAE0aFUhrKJBAZ+sWN/auphSDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/F32mO0WG8EoKDH09o/w5GJ0EjS3ELQuvArvH7EIm0s=; b=NZ1dPT09ZI974+18rRzDZ6rdxf2Ova54fQvi1h3KJRq/TozF45oRGRN3OtZo+BXB8XuAMlMLEu5a7pe0Nlqoj3eWqq7+Q1RgJrvIeC2PcJK9R65UTxR3PKFU+UDtzt8QEoPUpZecGZFW/sO+HMYRDtNFAMvm5zN2C6jpIb4tJrHEEOVIAn68iieCaUp3BFNoLBiBCURyL3Y0/6RQyHvwxo3lfeDY5fcifDCyPUyj68E25kWX52YA3FxJDVUbSXniW3dqYbT4U6oxvcZAICl+Kn+YgGnPraEafGwxjcap8HITHvClXL4Pr/EsLFDGea8+XYcAU35gkDF+iCHuwKKenA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/F32mO0WG8EoKDH09o/w5GJ0EjS3ELQuvArvH7EIm0s=; b=euE2631MZV6/0tBrt1Cy4Nmfo2qS9yB4+9GO2gsBRNEu9VQHKVSJw+KxzVCElfiF83c8Ha+q/JN8cPLW6Fvz3kClWc9UzTZDzcYIsHEPEx8ZNjqBNE2/lfExWHlGHJarE6YFs/4H9F+/Cuf8Xh+61Qkvmgc5uGOLd9+2UQQAWag= Authentication-Results: google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=none action=none header.from=synaptics.com; Received: from BN9PR03MB6058.namprd03.prod.outlook.com (2603:10b6:408:137::15) by BN9PR03MB6137.namprd03.prod.outlook.com (2603:10b6:408:11a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.20; Fri, 25 Jun 2021 07:57:25 +0000 Received: from BN9PR03MB6058.namprd03.prod.outlook.com ([fe80::502a:5487:b3ee:f61c]) by BN9PR03MB6058.namprd03.prod.outlook.com ([fe80::502a:5487:b3ee:f61c%3]) with mapi id 15.20.4264.023; Fri, 25 Jun 2021 07:57:25 +0000 Date: Fri, 25 Jun 2021 15:48:35 +0800 From: Jisheng Zhang To: Nick Desaulniers , stable@vger.kernel.org, Greg Kroah-Hartman , Nathan Chancellor , Ard Biesheuvel , Sami Tolvanen , Masahiro Yamada , Sedat Dilek , Thomas Bogendoerfer Cc: Catalin Marinas , Will Deacon , Alan Modra , =?utf-8?b?RsSBbmctcnXDrCBTw7JuZw==?= , Quentin Perret , linux-arm-kernel@lists.infradead.org Subject: [PATCH stable-v5.4 v2 1/2] kbuild: add CONFIG_LD_IS_LLD Message-ID: <20210625154836.382536b1@xhacker.debian> In-Reply-To: <20210625154737.3d64a434@xhacker.debian> References: <20210625154737.3d64a434@xhacker.debian> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) X-Originating-IP: [192.147.44.204] X-ClientProxiedBy: BYAPR06CA0033.namprd06.prod.outlook.com (2603:10b6:a03:d4::46) To BN9PR03MB6058.namprd03.prod.outlook.com (2603:10b6:408:137::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xhacker.debian (192.147.44.204) by BYAPR06CA0033.namprd06.prod.outlook.com (2603:10b6:a03:d4::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19 via Frontend Transport; Fri, 25 Jun 2021 07:57:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7f00a81d-6b37-4189-a703-08d937aeded9 X-MS-TrafficTypeDiagnostic: BN9PR03MB6137: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:118; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ithze1DRX7HpvwTv1ZqYH+AUMg79xSLCMS50T0XNb+APfwqhiHa/YmeC2AYX/KAhDgprbA555xIKuMXS3ZhDdk4OBk44Ig7l1QJyv1rPEcr4IbcXUZksGipuTpyNhuvL2XCF4dTu76dQTC++3WDu8TwsLCoLR7/5ZCjGAyliI7fO1Tx3XdVEBa2oy5g3XLsFSmotMZVb55XPnA5Yq/00eUZYODgrSK49LunMJhCsgdMeGZgF4LSY/BLbCB8x2thPQIMS2i93x4Lg1fTIHNCBxsa4sKIQ7dHAvmAf77EUIEhp/Ir0QdR4awy3xU3w1xdsLgb+VBP2CrjN8MbgecGeyEjp9JfkGiARPEPyvojOVP8J40qROkiq6QmJhMjOBsfZ9twY03MJVUIyMW+BNiYCVT8QFxmPfM0agVZkVsXWD/f1NGCtKm0vOgEOddtQ6UAyN9GgT0U48Y8r6bkAX1hHpusB7F5apiizE6npY2USQwHyaxRP1fw2ky4HesVMTDYqXubyS2Sp8nUIm6hLCy88I2oXad3Ptbqot8V8QDMwzs7x3ywKxDgFBGP8gDKuTGwcHtZw+uAt41nFQmd7Mi8T8gxk559clPVH196G9DhIhRDg6FnfBkrzSovEJeV11urAwLrZU6tuPL8vSKmS1atvaPjzp8UQghniXDRH47lxxKiV/NQzTE/kA2OEVgQv3IPbqpXPUOeom6c8Vhf/Jim2Ug== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR03MB6058.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(136003)(366004)(396003)(39850400004)(376002)(52116002)(2906002)(186003)(66946007)(316002)(6666004)(66476007)(8936002)(66556008)(7696005)(26005)(478600001)(55016002)(5660300002)(16526019)(9686003)(110136005)(7416002)(1076003)(54906003)(86362001)(6506007)(8676002)(38350700002)(38100700002)(956004)(4326008)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jBxgSsDahX9cMBluyUGUgonoioPdV+WLtkxILQ+3jXv6Nu1YJA1FF6zUK+BbNH5rfq44YLS1poTTeOsqZsKeWMd8ivr2RLk+3wA9vOo627oPSG4UKqFa6RxhvctkzpXRP5HsEcEWqx/MdH2tD2mntwD3cHzx28Vecg4mv/iKhoLxsDTMAR5eYLuxmB+T/Qyf+FNgJutXH8ulKiErdJS2WBtZnOX/96V2bE8Qpm2qGHD1mij+xqa7pjdGphclPVx2OfvhtrFQiY2elIwXpX+h2ObjlegZ2sO7TR1Tx81R2NojvXHs8TF6F84IP8ngExCQSITmHhclVKYIVl9/2IwMJNRtdNoftTL3wu+O5P9OTSZ7uSi0x+hxvfnnQWKEBhyo0i8oyXIfEckpy7wjyo7P8+OpPu/Cu5NZ5jEgCg5VEZoll3pSMo6wUZtXZkMiUWiRsbZEOS52nNgolxwQMXsI2sKCzprKDmXY1ezcmzJqGmr7Ng4erNdf+JXW+kY4U4/F0cpuK6RrZR7a08Gd4Tw9jjNhK7SX5CpV3HlAGsdA3UAAjik5GzS3MnOPJ03gKYt4Ke5b0scByrcbinhxSqtW7Lmy+oOIDMEuMVXbHHrUuux2OFJvrTrD5ll+eJugLDGWnFPmkT/55tJ8t+mCz6Hn9il6cMuFjWiFAiWH2sLpWOBbRE2VIO6C6jeUcB3X+lt9dGj0a71D03DdYzvzyES26hHvV2NseLgQDNrdMPjK8krDNN/W784i3iMI3mLtJPfAlLzEUZbUPDMgfXzFC4lYF1Co2jRixOUeRaYW+UXlzQ7hnENAPtSBYgCS0IwxKHc5x9QqPKoFvtEiKvNVCm1P2dg5idbv3FMXA4YExdyIP79CzUFJrXKZfR8ufPWtrimbPKhqrBujHwv+ZUoLFS9GOTfSOkJstSKWMGYV0oo5H8YnPY+u5nPwrQoG/6nc13NnujZ3M9xA0XHg0e7p53gdgy+5lb79PM56btGq/5H5w9aPb4kHvkkzYzdIxNzKkt299HK+WRTuhmKfD295O9XHDsegyAQ2KiWd2v8TjaSuO58VN0YzOmXe3lVLPE7Pw2/ihpngsVU/NxmkqqWTYqK6kEcPA0lRpPMJNrmCY6GdIUzLyGWLh5eRiC/iooJIQNHquNqPs+IbExsqE8pnumg9pWyd7Ak4OPyWQYnNcN/uMrDZ0jLg9yI7Hx9OnnSOrlVjUJOidNcGMPVz8yXKnAmFzcv1fuV3K69IVP41GlycJIM2eUnqn4dJUtOcIjiGAejTGnaRaT4suT+hnkTLaPzVt67ytJZsTSn2GozqVhgwnmfZ0pAC1osgndRKhLwfE8vE X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f00a81d-6b37-4189-a703-08d937aeded9 X-MS-Exchange-CrossTenant-AuthSource: BN9PR03MB6058.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2021 07:57:25.3424 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: B5/GZO3BfS9GrFJl55pN0kiPh5YnTCakNndYg9cKWCNzSXcAcHwjh776x8XBGrki2dTj0USAl3eODJMmowEdrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR03MB6137 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210625_005727_558577_B2C584D1 X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 --- init/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index 4f9fd78e2200..f23e90d9935f 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -20,6 +20,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))