Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1198407pxv; Thu, 1 Jul 2021 20:33:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1h0N6qLhwhwEB/cEflKK50Y7a8IJyb8sy+krfWvKoRADf/xIWXGvGAPKQ2o/MFrumQaek X-Received: by 2002:aa7:ccca:: with SMTP id y10mr3929597edt.47.1625196809171; Thu, 01 Jul 2021 20:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625196809; cv=none; d=google.com; s=arc-20160816; b=0Bbbv53b5QUIga43ZpQUkqcA5YisHHRGzqv5K48lvFYQ/ZcbvkXMFrUXcnYH0F2jRX D3O93e/Ux/v4pAEEmb+ePdznTRN45CGXpaVOYxb8kgi+SPRQW3I3UKOmR/GyazpKCOEn agSIZxzpuYwoD1Pd+EYfqTvaO+sQHBLuEpms5o0OgTd9//ffVusR0dkFA/IkMiNFcBm0 WURWsjopzJPzTgXWWzvugAA3upP6vfHRT37U53VTYBEZy1nf3ofYN/hDnmHRvFc6hhhl 2iw1JgsfebCNeNGjj6NYUVxlay32W0huTyJsjb7m7PI78akpiwWUqeY23NwPd+CtWbFM 8zxA== 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=fXORVYkcDLHNEAm0RShm5ax3jfzp9tvR8LVTAury0n4=; b=DoKUMv4mfXm3cWHG8R3NQIrZOhwZiGoCLv3XNa89UwuyVCKf0xy49OFdSCXZj//y+C iVxRNHSX5imSoxBv9Nir9VspL14kVmDVXxEYG5J6oH2uMWlfaV9JfnYx/lYCRecahpUf FTRFMaxaXreGwJiraI1iAHEFUAl376FA5bBWSRFT/6dwrh6rOcLhTbDlK3yYYFAj6wEs o5MwfgqNfG444rqW58Srkn4eymVk+Vxf1UUFUiC59QACaETyYt6Fn3XX2+VwxE99me8I lZNBjqmJvg/gARqVAXjDEUlMaLvaEMI8NPZ4ZnJMyO2J4G+6lGs39FxVtJzoudIo9zmp E6bw== 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 cz9si1700082edb.398.2021.07.01.20.33.05; Thu, 01 Jul 2021 20:33:29 -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 S234947AbhGBDcY (ORCPT + 99 others); Thu, 1 Jul 2021 23:32:24 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:54079 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S234791AbhGBDcX (ORCPT ); Thu, 1 Jul 2021 23:32:23 -0400 X-UUID: 7d324bbd23d241958e61a76959ad5029-20210702 X-UUID: 7d324bbd23d241958e61a76959ad5029-20210702 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 746403066; Fri, 02 Jul 2021 11:29:48 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 2 Jul 2021 11:29:46 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 2 Jul 2021 11:29:46 +0800 From: Lecopzer Chen To: , , , , CC: , , , , , Lecopzer Chen Subject: [PATCH v3 2/2] Kbuild: lto: add make version checking Date: Fri, 2 Jul 2021 11:29:43 +0800 Message-ID: <20210702032943.7865-3-lecopzer.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210702032943.7865-1-lecopzer.chen@mediatek.com> References: <20210702032943.7865-1-lecopzer.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LTO with MODVERSIONS 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 released 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 129df498a8e1..beee68149da8 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -639,6 +639,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 !MODVERSIONS || MAKE_VERSION >= 40200 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 -- 2.18.0