Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp456426pxv; Thu, 1 Jul 2021 01:56:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxIOge4r7JY02TI26ocfV5a2GAweg8ItkW6CK2TUjcX4SoWSONUKPBT+uI8XDzKvKt5MIb X-Received: by 2002:a02:956a:: with SMTP id y97mr12517492jah.58.1625129776158; Thu, 01 Jul 2021 01:56:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625129776; cv=none; d=google.com; s=arc-20160816; b=kK2qO9+AfkRA+kveNpW4RKEglOoClEszbX2naLY7oDqDY12BWfpo9B8U23qzXByI3D qQpZFrcTDwUZcFIKaDvW7RvG0Pb95GHG5ZQU+kUijdQ2XDXAx7Bkd8/4sJAYCXE5Y4HH 6QqaxtjWGBVTa46PlBzF8GvCO1LWwx62PUORgL61pvmxvtyEQGLNWJNmbkZZECpgNDm7 QIi35HTamq9U5elhInuUMekynFjoRmy5O3L6hvVQBVDKRP9KjbPySMnwsNutxtZkufgU fUKTnACxSmDifHU76AFwxSJ9oX/PWC+uWWR+/4dGK0zDZoBoAWUUgip404zyPrO3CxTs VyQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=FiaAMyQ7mERFl5LORVJs2AKiHmHkIK3N8lATW3lYcgA=; b=YE08v+jgMXcmwFDhwwl6neuXdApKhm5we9nc0B/pI/49VoCE7CY469Q/hm1zpciCbz d92il8xSksPMylh2WR5zs5V2tjD/7OXYoJwJu8yl8eUivIi6kuBRaegjV4uPvUVsZfjW Mjl94pcuoP8Ur0gEM9bGZDO3esxj483mpnlNmcAjDiw2+zXOgvsYJY1Rr3JNfhBL77iR dJftKnuylqd9fhPmZVMuvpcwAXIG1KTw7L98FUIx+cCJAM0NIr4mfa1TJhaSsnZEAiXl Sts49Cm8s2TYL3WhwQRbzLA4X9YZMY6h3LsnaPyWan3KQNIshAsYSL3okImiFhS45L1y 3sAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si8163943ilm.64.2021.07.01.01.56.04; Thu, 01 Jul 2021 01:56:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235497AbhGAI5o (ORCPT + 99 others); Thu, 1 Jul 2021 04:57:44 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:57140 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S235088AbhGAI5n (ORCPT ); Thu, 1 Jul 2021 04:57:43 -0400 X-UUID: 9cfc03a74eeb461082d1641529f2264f-20210701 X-UUID: 9cfc03a74eeb461082d1641529f2264f-20210701 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1520831154; Thu, 01 Jul 2021 16:55:10 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 1 Jul 2021 16:55:09 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 1 Jul 2021 16:55:09 +0800 From: Lecopzer Chen To: CC: , , , , , , , , Subject: Re: [PATCH 2/2] Kbuild: lto: add make version checking Date: Thu, 1 Jul 2021 16:55:09 +0800 Message-ID: <20210701085509.395-1-lecopzer.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <6d687b9a-c295-ce8b-9472-d2859977be2d@kernel.org> References: <6d687b9a-c295-ce8b-9472-d2859977be2d@kernel.org> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 6/30/2021 5:14 AM, Lecopzer Chen wrote: > > LTO with MODVERSION will fail in generating correct CRC because > > the makefile rule doesn't work for make with version 3.8X.[1] > > > > Thus we need to check make version during selecting on LTO Kconfig. > > and the suitable version should be 4.2(40200) which release in 2016[2]. > > > > [1] https://lore.kernel.org/lkml/20210616080252.32046-1-lecopzer.chen@mediatek.com/ > > [2] https://ftp.gnu.org/gnu/make/ > > Signed-off-by: Lecopzer Chen > > --- > > arch/Kconfig | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/Kconfig b/arch/Kconfig > > index c45b770d3579..1571957bade5 100644 > > --- a/arch/Kconfig > > +++ b/arch/Kconfig > > @@ -632,6 +632,7 @@ config HAS_LTO_CLANG > > def_bool y > > # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510 > > depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD && AS_IS_LLVM > > + depends on MAKE_VERSION_INT >= 40200 > > If the bug depends on CONFIG_MODVERSIONS, should this be > > depends on !MODVERSIONS || MAKE_VERSION >= 40200 > > ? Especially since the problematic block in your original report is > gated on CONFIG_LTO_CLANG + CONFIG_MODVERSIONS. > You're right, I'll fix it in v2, thanks for reviewing. > > depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) > > depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) > > depends on ARCH_SUPPORTS_LTO_CLANG > >