From nobody Mon Feb 9 04:45:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148641; cv=none; d=zohomail.com; s=zohoarc; b=MTaup7BTDQwnN4WdIbrCFnycUAvTB6btWvGrhO1ZImbuYgqgDrUHO44TmLSvS31Cet7ZSqtM3SIjGvFhIpwAsQlPp9rB2mQrqn+TMX7qCOVeSylCK7kHLUykp2B3w/ede6Uib+f9Rtu99C+LIs8sObk66fJkcGEocSWyEkh/SUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148641; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mM0UxFWSP9nF1l7EFtEltL6n0lWKTRjKGy93VVS37o4=; b=aUacfiQbxGCjnrUZUwlfkpbQ85Qf2b8FLYKTEkfaQHXOhD3/SyTjGw3xgGM60xqhJKBZHtZ6Z8IIhTyZHq+I7VXfgB5o2IoIwXqPWCWSGocYKI0RJj4d/VIde7dnKlPZFvjr+YFdaH44rCC1FLEBsS40yi2gbkwtE3ZtgAoINUE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 16251486408911.7490608971291977; Thu, 1 Jul 2021 07:10:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148705.274818 (Exim 4.92) (envelope-from ) id 1lyxOe-0005gD-1Q; Thu, 01 Jul 2021 14:10:28 +0000 Received: by outflank-mailman (output) from mailman id 148705.274818; Thu, 01 Jul 2021 14:10:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOd-0005g4-T0; Thu, 01 Jul 2021 14:10:27 +0000 Received: by outflank-mailman (input) for mailman id 148705; Thu, 01 Jul 2021 14:10:27 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOd-0005F9-Ie for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:27 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 115b20d1-da76-11eb-8327-12813bfff9fa; Thu, 01 Jul 2021 14:10:21 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 115b20d1-da76-11eb-8327-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148621; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8wF1OZRVMN+i4dPl8jzrjodmwU9+O8uvhRvJWa7YhLU=; b=Gz3SFPxQKsGE1TkVWplAILoectsooQsY0ULsu7CldwrHwWfZW8V8qwQi c7PNBI5LYPj4YyWObbQ53qgXqG70Bn9ZIcH+6TcHfaMVroBSDz7gNlRHx VApIUhdwcmks6RoAt7I0Bar0J0pblA0EP6cYaI7Mu6LJfFQSYOPLtbe4u A=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: GfoBV98qFKEsx0+8+X25twMo7xYrQOCMiSGiXjJZB00zgSiOH6Lux/lC1O6UFX7cFaijWpt7+Y 6YGank19UXg9Vy2SnUXE/ovuzUQzsCjw+Tp7a+CG+0IPS3imfW82NlbM0UNPi1PZaLzbtq6cL1 XIn4nznTdeF4Urw+kOU4ii9xCz8WKrP9ajKMKRcj5wIDAx4Cv66KR/r6S4zVwIxIQ3zkxgrAtV /+vhiM9a03xW0Sggftt9t1CqRmL2S65JsVekG59dibwnpuVw1Jq3ke7lyH+tt1agKyfLzHYrKp y8k= X-SBRS: 5.1 X-MesageID: 47376076 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:hmFiDqAkgXNXX0vlHemq55DYdb4zR+YMi2TC1yhKJiC9Ffbo8P xG/c5rrCMc5wxxZJhNo7290ey7MBHhHP1OkO0s1NWZPDUO0VHAROoJ0WKh+UyEJ8SXzJ866U 4KScZD4bPLYWSS9fyKgzWFLw== X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47376076" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Tim Deegan Subject: [XEN PATCH v6 02/31] build: introduce cpp_flags macro Date: Thu, 1 Jul 2021 15:09:42 +0100 Message-ID: <20210701141011.785641-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD --- Notes: v6: - switch to a macro as suggested which allows to be used with both a_flags and c_flags =20 v5: - new patch xen/Rules.mk | 7 +++++-- xen/arch/x86/mm/Makefile | 2 +- xen/arch/x86/mm/hap/Makefile | 2 +- xen/arch/x86/mm/shadow/Makefile | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index d65d6a48993b..f778058f80a6 100644 --- 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.=20 $(obj-bin-y): XEN_CFLAGS :=3D $(filter-out -flto,$(XEN_CFLAGS)) =20 +# To be use with $(a_flags) or $(c_flags) to produce CPP flags +cpp_flags =3D $(filter-out -Wa$(comma)%,$(1)) + # Calculation of flags, first the generic flags, then the arch specific fl= ags, # and last the flags modified for a target or a directory. =20 @@ -222,13 +225,13 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): = %.init.o: %.o FORCE $(call if_changed,obj_init_o) =20 quiet_cmd_cpp_i_c =3D CPP $@ -cmd_cpp_i_c =3D $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -MQ $@ -o $@ = $< +cmd_cpp_i_c =3D $(CPP) $(call cpp_flags,$(c_flags)) -MQ $@ -o $@ $< =20 quiet_cmd_cc_s_c =3D CC $@ cmd_cc_s_c =3D $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ =20 quiet_cmd_cpp_s_S =3D CPP $@ -cmd_cpp_s_S =3D $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ = $< +cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< =20 %.i: %.c FORCE $(call if_changed,cpp_i_c) diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index b31041644fe8..2818c066f76a 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -15,7 +15,7 @@ guest_walk_%.o: guest_walk.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%.s: guest_walk.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index 22e7ad54bd33..c6d296b51720 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -9,7 +9,7 @@ guest_walk_%level.o: guest_walk.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%level.s: guest_walk.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makef= ile index 770213fe9d84..fd64b4dda925 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -10,7 +10,7 @@ guest_%.o: multi.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_%.i: multi.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_%.s: multi.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ --=20 Anthony PERARD