On 2024-07-03 14:51, Jan Beulich wrote:
On 01.07.2024 15:43, Alessandro Zucchelli wrote:
From: Maria Celeste Cesario <maria.celeste.cesa...@bugseng.com>
Modify creation rule for asm-offsets.h to conform to
the new standard and to not generate conflicting guards
between architectures (which is a violation of the directive).
Modify generic-y creation rule to generate code without violations
and to conform to the new standard.
Mechanical change.
---
Changes in v4:
- improve inclusion guard generation
Signed-off-by: Maria Celeste Cesario
<maria.celeste.cesa...@bugseng.com>
Signed-off-by: Simone Ballarin <simone.balla...@bugseng.com>
Signed-off-by: Nicola Vetrini <nicola.vetr...@bugseng.com>
Signed-off-by: Alessandro Zucchelli <alessandro.zucche...@bugseng.com>
---
xen/build.mk | 7 ++++---
xen/scripts/Makefile.asm-generic | 8 +++++++-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/xen/build.mk b/xen/build.mk
index 0f490ca71b..bbd4c2970f 100644
--- a/xen/build.mk
+++ b/xen/build.mk
@@ -47,6 +47,7 @@ asm-offsets.s: arch/$(SRCARCH)/$(ARCH)/asm-offsets.c
arch/$(SRCARCH)/include/asm/asm-offsets.h: asm-offsets.s
@(set -e; \
+ guard=$$(echo ASM_${SRCARCH}_ASM_OFFSETS_H | tr a-z A-Z); \
Was this and ...
--- a/xen/scripts/Makefile.asm-generic
+++ b/xen/scripts/Makefile.asm-generic
@@ -32,7 +32,13 @@ old-headers := $(wildcard $(obj)/*.h)
unwanted := $(filter-out $(generic-y)
$(generated-y),$(old-headers))
quiet_cmd_wrap = WRAP $@
- cmd_wrap = echo "\#include <asm-generic/$*.h>" > $@
+cmd_wrap = \
+ guard=$$(echo ASM_GENERIC_${SRCARCH}_$*_H | tr a-z A-Z); \
... this mean to be using $(ARCHDIR) as well then?
The introduction of ARCHDIR is a slip-up from amending the previous
version of the patch series.
This script is correct as it is.
--
Alessandro Zucchelli, B.Sc.
Software Engineer, BUGSENG (https://bugseng.com)