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 4E67BC4332F for ; Tue, 13 Dec 2022 16:42:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235632AbiLMQmT (ORCPT ); Tue, 13 Dec 2022 11:42:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236175AbiLMQmO (ORCPT ); Tue, 13 Dec 2022 11:42:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46F2764E6; Tue, 13 Dec 2022 08:42:10 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D25526160D; Tue, 13 Dec 2022 16:42:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9C5EC433D2; Tue, 13 Dec 2022 16:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670949729; bh=H/loUsa51Ym3ortfT1MNfYEs/AlpDljAaLTIMLqtEV4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=N+QQfONcp6tuGfLtJYpM+7FuUSEYnSgji/3RK7ZPOXq08JHEe1DaV+yST6qsjLMhj RpLZ5DEObzsGYt56Le4oaxKGzrMSOx5CHVoo8SyuueO5uKY2ijEUkf36911OmGNNbX j0MsuPG/99W9KG1GYm54n6v63d63orluPpV/id7Jgk7QKif+WSmnXHNTvQ44GAFGBN Tjhp6EWrJe6fO4bdVAjvKPjKfv3zwebP9TGgjkCnxhTs6df9X9itR47R5YHMMk9YsX vvVecUymAa2X+ltthxlSyVvhWfO7FQPqfxQF/MLz26KMMsIsC+tIBLkO+tLFFS1ZYw bcj9/bj/NKHmw== Date: Tue, 13 Dec 2022 09:42:07 -0700 From: Nathan Chancellor To: Nicolas Schier Cc: Masahiro Yamada , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers Subject: Re: [PATCH] kbuild: ensure Make >= 3.82 is used Message-ID: References: <20221211030352.2622425-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org On Tue, Dec 13, 2022 at 11:05:05AM +0100, Nicolas Schier wrote: > On Tue, Dec 13, 2022 at 04:58:30AM +0100 Nicolas Schier wrote: > > On Mon 12 Dec 2022 10:21:10 GMT, Nathan Chancellor wrote: > > > On Sun, Dec 11, 2022 at 12:03:52PM +0900, Masahiro Yamada wrote: > > > > Documentation/process/changes.rst notes the minimal GNU Make version, > > > > but it is not checked anywhere. > > > > > > > > We could check $(MAKE_VERSION), but another simple way is to check > > > > $(.FEATURES) since the feature list always grows although this way > > > > is not always possible. For example Make 4.0 through 4.2 have the > > > > same set of $(.FEATURES). > > > > > > > > Signed-off-by: Masahiro Yamada > > > > > > Reviewed-by: Nathan Chancellor > > > > Reviewed-by: Nicolas Schier > > > > > > --- > > > > > > > > Changes in v3: > > > > - Check the version in a different way > > > > > > > > Makefile | 5 +++++ > > > > 1 file changed, 5 insertions(+) > > > > > > > > diff --git a/Makefile b/Makefile > > > > index 2dda1e9a717a..66dfc5751470 100644 > > > > --- a/Makefile > > > > +++ b/Makefile > > > > @@ -11,6 +11,11 @@ NAME = Hurr durr I'ma ninja sloth > > > > # Comments in this file are targeted only to the developer, do not > > > > # expect to learn how to build the kernel reading this file. > > > > > > > > +# Ensure Make >= 3.82 > > > > +ifeq ($(filter undefine,$(.FEATURES)),) > > > > +$(error Make $(MAKE_VERSION) is too old) > > > > > > Would it make sense to state what version is needed, similar to the > > > Kconfig checks for compiler and binutils? > > > > Checking against 'undefine' (introduced in make-3.82~38) is quite a > > nice way, I think. Otherwise we needed something like > > $(filter 3.82% 3.9% 4.% 5.% ..., $(MAKE_VERSION)). > > > > Nathan, sorry, I somehow I read your question completely wrong. I would also > appreciate if the minimum make version would be shown in the error message. No worries, I have done that many a time :) I see Masahiro updated this to v4 with this feedback taken into consideration so I am glad to see we are all in agreement. Cheers, Nathan