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 6074EC433EF for ; Sun, 3 Apr 2022 09:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243877AbiDCJMn (ORCPT ); Sun, 3 Apr 2022 05:12:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234343AbiDCJMm (ORCPT ); Sun, 3 Apr 2022 05:12:42 -0400 Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCB7632EEC for ; Sun, 3 Apr 2022 02:10:48 -0700 (PDT) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nawFy-00091i-GC for linux-kernel@vger.kernel.org; Sun, 03 Apr 2022 11:10:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Akemi Yagi Subject: Re: [PATCH] Makefile: fix config cc version check Date: Sun, 3 Apr 2022 09:10:38 -0000 (UTC) Message-ID: References: <20220307223231.608498-1-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git) Cc: linux-kbuild@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 08 Mar 2022 11:23:31 +0900, Masahiro Yamada wrote: > On Tue, Mar 8, 2022 at 7:32 AM Michael S. Tsirkin > wrote: >> >> .config is of the form: >> CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)" > > > No. This was changed. > > See this: > > $ git show 129ab0d2d9f -- Makefile > > > >> while CC_VERSION_TEXT is of the form: gcc (GCC) 11.2.1 20220127 (Red >> Hat 11.2.1-7) >> >> thus when comparing these, CONFIG_CC_VERSION_TEXT should not be put in >> "", otherwise we get () outside "" which shell then tries to evaluate. >> >> Signed-off-by: Michael S. Tsirkin >> --- >> Makefile | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/Makefile b/Makefile index daeb5c88b50b..d5c03c827825 >> 100644 --- a/Makefile +++ b/Makefile @@ -1714,9 +1714,9 @@ PHONY += >> prepare >> # now expand this into a simple variable to reduce the cost of shell >> evaluations prepare: CC_VERSION_TEXT := $(CC_VERSION_TEXT) >> prepare: >> - @if [ "$(CC_VERSION_TEXT)" != "$(CONFIG_CC_VERSION_TEXT)" ]; >> then \ >> + @if [ "$(CC_VERSION_TEXT)" != $(CONFIG_CC_VERSION_TEXT) ]; then >> \ >> echo >&2 "warning: the compiler differs from the one >> used to build the kernel"; \ >> - echo >&2 " The kernel was built by: >> $(CONFIG_CC_VERSION_TEXT)"; \ + echo >&2 " The kernel >> was built by: "$(CONFIG_CC_VERSION_TEXT)";" \ >> echo >&2 " You are using: >> $(CC_VERSION_TEXT)"; \ >> fi >> >> -- >> MST I believe the patch proposed by Michael indeed fixes an issue introduced by 129ab0d2d9f (Makefile). Please see the following bug reports: https://elrepo.org/bugs/view.php?id=1215 https://elrepo.org/bugs/view.php?id=1214 and this forum post: https://www.phoronix.com/forums/forum/software/general-linux-open-source/ 1303986-linux-5-17-rc1-released-a-little-bit-early-but-with-shiny-new- features#post1304036 Akemi