Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2677612pxv; Sat, 3 Jul 2021 17:18:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ0PaSgpD7K2fc/G0v5GgfcDQq1dNk4KwIKjAUXmHOhD1ZhkbDU5Xg523q4GJfmqJkG1uF X-Received: by 2002:a6b:cf12:: with SMTP id o18mr5897142ioa.86.1625357914009; Sat, 03 Jul 2021 17:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625357914; cv=none; d=google.com; s=arc-20160816; b=KwCoE4/LIuCXbykTQY3gRGDC0dwYR0ae+WceZKZi/ecLx36FTwbJUJGL/tYbZ7495/ m7weARH0N9tUHMe9y/fpIkHCviaONSVaos8HSwupQqHlTdg8mW7vEgC1+ZLO+xQJoyRp vLuDfrcMua3GKINz13KEoU8kt5o7WwnYtKSLOSQBUncywlnllFyRXOLDDcLMKdL9nTX4 T7GjJBUgffHQ0WbBOkwR+DutNB6HVXq+NENGygEpOOVBTHI4qNR7wVC/fZgTr7g18V/c lLNevyR8OP7TgCE7LPg4eK4/NdNHiAOSiN76/YrGk7SZeWnEy8j3uTTReb1I2lhPwn2h SXHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ydlpqDYhtsZfol1/TbQm0k6ZIPfDjbyLtbtKa8wjd2A=; b=AbGst3jiiJVVU3BH0z/XQ6hCfHDtJTq2yqQ10oxTceVUcbe/aYNA3D4p6jG5H8ZBTC X752ytxd2r6Dw5Jg/38U9LGfVJL1o7JAVKwoEeY5E5EWuXt8+mbBF4w46R/JlSS3eWRW PQCQ2hHKRwoITZT78XZhG6plGP5F336NyftgdUs3Dq7SE3y8Up+ycx/yaqIOh9BYvP2c AdzpH6Hac4In7o3EB6P7WH7um8T+4HLkywBngp1HIQIe80wYgZqdARV6fE18wzVDLeWf SL9enoYUS2FThfYCm6v7q50TiwzOo2UEnQZsWINTi9aijPuI2mIzyRI7t8/0rrZ8zGF6 OcxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P5xzEo6s; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si8651883ilq.51.2021.07.03.17.18.22; Sat, 03 Jul 2021 17:18:34 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P5xzEo6s; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbhGDATd (ORCPT + 99 others); Sat, 3 Jul 2021 20:19:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:53590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbhGDATd (ORCPT ); Sat, 3 Jul 2021 20:19:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 359CB61443; Sun, 4 Jul 2021 00:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625357819; bh=PPAPh8PB3Qid66l3SUdSzjh88YZamPtSAuWf0trnz2Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P5xzEo6sSeADfmDQCXV/fKLBfMbZkI9/Vk+wpJVQA+AEPrR+e+d1DPXCG6Orki76F u9NxfL1g9CUqAD8bN15NnGmIYkhkfhD/RQQt3p249U2p8EKpsw8ipyb3pHEsHcjvI4 0yWPPuGKIgugwf2S8PWVPDdjPhI3MLaWpX1yhsYO8ayYxpeME/d2cnZWkffkKDLLlB w0SEl2fYPGDumsyikmt4pg2foHGPe3XbIxm9Pvjkoak9K2eDoXvs+3b3WfB1ZZ1wYK djU5OR8Sqmn49fkjNy6pvc2WvGzx+T0fDnfBNLLEhmehffTq6neMQWpnKM8T84IQ8x f7ujKJujd5qEA== Date: Sat, 3 Jul 2021 17:16:55 -0700 From: Nathan Chancellor To: Lecopzer Chen Cc: ndesaulniers@google.com, keescook@chromium.org, samitolvanen@google.com, linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, yj.chiang@mediatek.com, masahiroy@kernel.org, michal.lkml@markovi.net Subject: Re: [PATCH v3 2/2] Kbuild: lto: add make version checking Message-ID: References: <20210702032943.7865-1-lecopzer.chen@mediatek.com> <20210702032943.7865-3-lecopzer.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210702032943.7865-3-lecopzer.chen@mediatek.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 02, 2021 at 11:29:43AM +0800, Lecopzer Chen wrote: > 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 Reviewed-by: Nathan Chancellor > --- > 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