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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AEDDC433E6 for ; Wed, 24 Feb 2021 03:16:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB0CD64E6F for ; Wed, 24 Feb 2021 03:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233043AbhBXDP6 (ORCPT ); Tue, 23 Feb 2021 22:15:58 -0500 Received: from conssluserg-05.nifty.com ([210.131.2.90]:21212 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232310AbhBXDPz (ORCPT ); Tue, 23 Feb 2021 22:15:55 -0500 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 11O3Efsb017357; Wed, 24 Feb 2021 12:14:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 11O3Efsb017357 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1614136482; bh=BxAdqFYTvCTCTcnQXNwMMcHQIOzVEEBf5uOSZ6wOE+I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EhPtFp6x4LfAnoP+aDRrkgRSlW5kBanvoL5CxFfNgwdjlt+886ah3F7fyCj3RRUTT Jbp0i4P7sPO8Z6TlBfA2TIXu4AhXIgXBd2DPHLeHLwgFlSXEhCYGLaL5ddZEaQmE6R lBKCf1hssu3RMzs8O4iF10xma9eJUrnU25Wwm0p/Z2evg1xwKfDGu2uXe1Nzi16F5Q fVQ1p1ytOglIP+PP8xjVYr1ZbrfSFacIs8cjEg5scYCINlaYxPO/p0Ip/nOeNezNTf n6WLy4H0vSBJtqsETI5ypWTll3yMkxWaJD2qIYrJslEtKiM5ETA1wgPZSn2SWtGDAa 6GswgFvNqNgfg== X-Nifty-SrcIP: [209.85.210.170] Received: by mail-pf1-f170.google.com with SMTP id 201so401454pfw.5; Tue, 23 Feb 2021 19:14:42 -0800 (PST) X-Gm-Message-State: AOAM530SyikKzlWwOaDnE0gO/aeJSdMPtDBtPJAjyAdBIaaDQ2Js5QCf CX60Cqfr7eOxFac3rkdLyg1dviumTVosn0nLTpc= X-Google-Smtp-Source: ABdhPJxaTM2Pzjx5chKj2KPAi1nBnluvWeKX08mcehL1SmBMguHGmpuQalDO7/qm9cM0ZI3EJRANpEWuV8mfUGW6Bjo= X-Received: by 2002:a62:1412:0:b029:1ec:bc11:31fd with SMTP id 18-20020a6214120000b02901ecbc1131fdmr28966427pfu.76.1614136481220; Tue, 23 Feb 2021 19:14:41 -0800 (PST) MIME-Version: 1.0 References: <20210205220125.2931504-1-ndesaulniers@google.com> In-Reply-To: From: Masahiro Yamada Date: Wed, 24 Feb 2021 12:14:04 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Makefile: reuse CC_VERSION_TEXT To: Sedat Dilek Cc: Nick Desaulniers , Michal Marek , Nathan Chancellor , Linux Kbuild mailing list , Linux Kernel Mailing List , clang-built-linux Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 6, 2021 at 12:46 PM Sedat Dilek wrote: > > On Sat, Feb 6, 2021 at 2:49 AM Masahiro Yamada wrote: > > > > On Sat, Feb 6, 2021 at 7:01 AM 'Nick Desaulniers' via Clang Built > > Linux wrote: > > > > > > I noticed we're invoking $(CC) via $(shell) more than once to check the > > > version. Let's reuse the first string captured in $CC_VERSION_TEXT. > > > > > > Fixes: 315bab4e972d ("kbuild: fix endless syncconfig in case arch Makefile sets CROSS_COMPILE") > > > > > > I did not touch this hunk because I have a plan > > for different refactoring, but I have never got > > around to do it. > > > > Anyway, you beat me, and I will pick this up. > > But, the Fixes tag is questionable because > > this is code refactoring. > > > > When I see this... and hear refactoring... As a suggestion/improvement... > > Can we have LD_VERSION_TEXT analogue to CC_VERSION_TEXT? > Both are shown when doing a `cat /proc/version` (and IIRC in file > include/generated/compile.h). Sorry, I had forgotten to answer this question. Probably, we should do so. Feeding it to Kconfig allows us to re-evaluate config settings when tools are upgraded. One question is where we should draw a line. If we record the version text of CC, LD, we should do that for more tools? For LD, I will be probably OK because some features rely on LD_VERSION or $(ld-option ). -- Best Regards Masahiro Yamada