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=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 1DF54C433F5 for ; Mon, 6 Sep 2021 10:06:26 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D655260EFD for ; Mon, 6 Sep 2021 10:06:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D655260EFD Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.179558.325877 (Exim 4.92) (envelope-from ) id 1mNBVz-000424-EW; Mon, 06 Sep 2021 10:06:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 179558.325877; Mon, 06 Sep 2021 10:06:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mNBVz-00041x-BG; Mon, 06 Sep 2021 10:06:11 +0000 Received: by outflank-mailman (input) for mailman id 179558; Mon, 06 Sep 2021 10:06:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mNBVx-00041r-Fx for xen-devel@lists.xenproject.org; Mon, 06 Sep 2021 10:06:09 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 07395f79-cf56-48d6-84eb-f99b86417c34; Mon, 06 Sep 2021 10:06:05 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 07395f79-cf56-48d6-84eb-f99b86417c34 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1630922765; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=I+fziuhvRpesrSNJ0c58bAv+DQLU4/GtqeroDqk51ko=; b=Txa8Q1FrwWSYqb/7kg10gt9OvL4/smv5v490hv3SJmlSN3zQPZEVPVLr Ij5zWv9IZQQ3hnx5x+IssLtSZl1cD1+/ZKdkhY7eSVssduiwm9B+lmXmg q71FK9u/mKlOQoYEbFlCQSpGOIALn8cjLsP/9AVcJsOSVdOtvRirMNShg c=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: So0UWvXWJbMpiG7Qti2/no7YCzlCG/49Hbao8u9m0kWwGa0lkGO5dvExafKxklAzj6OIWJamLg cp8/WRGR8mmTOnsMmWeFPRem/SIRvIqxXhQlaNtBpdnRTlGed76w2mPf2U5QL0msZnaYmANnsh Bciibf9T7J6C6ZsT/cv4YyO1XNErb0FJvTrKxPQSje3IBPOWRlR9upE5+nzu4vJ21rcZ9c/ywK CizNEtVFksmMTBKez0xygl1B+nroj0HtV5W71BMYJs8AocF9ixeEsMlfJ/LWf0DKPSYXkA3IM4 0FJk65YWwePoNZZvCarQLjN7 X-SBRS: 5.1 X-MesageID: 52079071 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:AGu+uavt4251vxZfbGl7V1O47skDdtV00zEX/kB9WHVpmszxra 6TddAgpHvJYVcqKRQdcL+7VZVoLUmxyXcx2/h3AV7AZniFhILLFuFfBOLZqlWKcREWtNQttp uIG5IObuEYZmIasS+V2maFL+o= X-IronPort-AV: E=Sophos;i="5.85,272,1624334400"; d="scan'208";a="52079071" Date: Mon, 6 Sep 2021 11:06:01 +0100 From: Anthony PERARD To: Jan Beulich CC: Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu , Roger Pau =?iso-8859-1?Q?Monn=E9?= , "Tim Deegan" , Subject: Re: [XEN PATCH v7 01/51] build: introduce cpp_flags macro Message-ID: References: <20210824105038.1257926-1-anthony.perard@citrix.com> <20210824105038.1257926-2-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: On Thu, Sep 02, 2021 at 12:08:58PM +0200, Jan Beulich wrote: > On 24.08.2021 12:49, Anthony PERARD wrote: > > Signed-off-by: Anthony PERARD > > Reviewed-by: Jan Beulich > albeit with a remark: > > > --- a/xen/Rules.mk > > +++ b/xen/Rules.mk > > @@ -133,6 +133,9 @@ endif > > # Always build obj-bin files as binary even if they come from C source. > > $(obj-bin-y): XEN_CFLAGS := $(filter-out -flto,$(XEN_CFLAGS)) > > > > +# To be use with $(a_flags) or $(c_flags) to produce CPP flags > > +cpp_flags = $(filter-out -Wa$(comma)% -flto,$(1)) > > Afaics this has nothing to do with Linux'es cpp_flags, so what we do here > is entirely up to us. If this is strictly intended to be used the another > macro, wouldn't it make sense to have > > cpp_flags = $(filter-out -Wa$(comma)% -flto,$($(1))) > > here and then e.g. ... > > > @@ -222,13 +225,13 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o FORCE > > $(call if_changed,obj_init_o) > > > > quiet_cmd_cpp_i_c = CPP $@ > > -cmd_cpp_i_c = $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -MQ $@ -o $@ $< > > +cmd_cpp_i_c = $(CPP) $(call cpp_flags,$(c_flags)) -MQ $@ -o $@ $< > > ... the slightly simpler / easier to read > > cmd_cpp_i_c = $(CPP) $(call cpp_flags,c_flags) -MQ $@ -o $@ $< > > here? I don't think this is better or simpler. "cpp_flags" don't need to know the name of the variable to be useful. I think it is better to know that "cpp_flags" act on the value of the variable rather than the variable itself, when reading "$(call cpp_flags, $(a_flags))". But thanks for the suggestion, and for the review, -- Anthony PERARD