[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v7 01/51] build: introduce cpp_flags macro


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 2 Sep 2021 12:08:58 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9yxvLHW7DrlOt3aGmZBGtc6h5E1gB+AHZW+4J/6Z/sQ=; b=XYc3Fza8SrSazbCb5uIgrFDMvUSw6QODoR0TQQulR1fvY4XJ2x1fN1xD0nTwD8adzlAm4kblSLKmhi5sxoLxj8TNPHdmshsSOdEw2ly64V4mOlxO3gPcQThi1vglUqac+QyT+6XIduiKHytlL44Do+ewW3tAToPWP770MNAwONJiCyxqgF/LAE9BFCEAiRJl6FY4tv/c1XyoMrFn3mGsfA0FMmQ2ViOHLSwwDknnBO3yPib3Z1FrUssf1Sa17+keYSAM1Wuj7A6r3KEctVxl2908VeiOE0hfSCQNyyhCbIrecOPNkw8tv+zqWc88VGMPU/s5/1WteEjoxHJykHg9sw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YE3kKwatrUCoCXOglCwjuP8j/DwoQdsN5AQpaHp6x5JNm0bVrvI+8umQIsPmCs9Rw9AQjZ7EGifkEohiZCeX02SD+iYM70WFMyHfSoevDPrKpIAq9a0oiyhhDElTclNNgcbf54UbO+lGehCheW2IRDLYOaaCwV7EVpcaRHYx2BAAGrrRZviCYkjOnUJFPxHPLKqMHYklUpAhzsWY3cn1u+X7ViTTNwr0lbduK7A+wzLic05ZKBJzPQ/mjZkCh97SUHpCfgQkwmhDOEut0rSYgGO33RdVWeGlvg78XOsGZ/m6k5G04NKHJAg19AaHnXfZocaCSGpLwIT2CMd+1Ltb1A==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 02 Sep 2021 10:09:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2021 12:49, Anthony PERARD wrote:
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
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?

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.