Skip to contentSkip to conversation

package/xen: fix armv7 build with gcc-15

PATCH Applied Vincent Stehlé 2 participants 3 messages Mar 18 – Mar 27

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/xen: fix armv7 build with gcc-15

Backport a patch from Xen 4.21 to fix the following build errors for Arm v7 with gcc-15:

xen-4.14.6/xen/include/asm/platforms/midway.h:1: error: header guard '__ASM_ARM_PLATFORMS_MIDWAY_H' followed by '#define' of a different macro [-Werror=header-guard] xen-4.14.6/xen/include/asm/platforms/omap5.h:1: error: header guard '__ASM_ARM_PLATFORMS_OMAP5_H' followed by '#define' of a different macro [-Werror=header-guard]

Since the external 32b arm toolchain has been updated to a version based on gcc-15, the tests.package.test_xen.TestXenArmv7 python test does not build anymore.
Adding the patch repairs it.

Fixes 86d453a7dc08 ("toolchain/toolchain-external/toolchain-external-arm-arm: bump to 15.2.rel1")
Cc Alistair Francis <[email protected]>
Cc Dowan Gullient <[email protected]>
---
 ...9-Arm-platforms-fix-build-with-gcc15.patch | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/xen/0009-Arm-platforms-fix-build-with-gcc15.patch
package/xen/0009-Arm-platforms-fix-build-with-gcc15.patch new file +46 -0
new file mode 100644
index 0000000000..fb95ca9fa5
@@ -0,0 +1,46 @@
+From d12666d74dc742bb06c30b96d6b874a3e14c6b46 Mon Sep 17 00:00:00 2001
+From: Jan Beulich <[email protected]>
+Date: Tue, 26 Aug 2025 08:41:18 +0200
+Subject: [PATCH] Arm/platforms: fix build with gcc15
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For two of the headers gcc15 complains "header guard ... followed by
+'#define' of a different macro". Misra certainly wouldn't have liked
+this either, if these headers were covered by a scan.
+
+Signed-off-by: Jan Beulich <[email protected]>
+Acked-by: Michal Orzel <[email protected]>
+Upstream: https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=39f95089e2ba15c5438ce904c0cbbd8d79d3e6e7
+Signed-off-by: Vincent Stehlé <[email protected]>
+---
+ xen/include/asm-arm/platforms/midway.h | 2 +-
+ xen/include/asm-arm/platforms/omap5.h  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xen/include/asm-arm/platforms/midway.h b/xen/include/asm-arm/platforms/midway.h
+index 099e435..6914393 100644
+--- a/xen/include/asm-arm/platforms/midway.h
++++ b/xen/include/asm-arm/platforms/midway.h
+@@ -1,5 +1,5 @@
+ #ifndef __ASM_ARM_PLATFORMS_MIDWAY_H
+-#define __ASM_ASM_PLATFORMS_MIDWAY_H
++#define __ASM_ARM_PLATFORMS_MIDWAY_H
+ 
+ /* addresses of SREG registers for resetting the SoC */
+ #define MW_SREG_PWR_REQ             0xfff3cf00
+diff --git a/xen/include/asm-arm/platforms/omap5.h b/xen/include/asm-arm/platforms/omap5.h
+index c559c84..8867b45 100644
+--- a/xen/include/asm-arm/platforms/omap5.h
++++ b/xen/include/asm-arm/platforms/omap5.h
+@@ -1,5 +1,5 @@
+ #ifndef __ASM_ARM_PLATFORMS_OMAP5_H
+-#define __ASM_ASM_PLATFORMS_OMAP5_H
++#define __ASM_ARM_PLATFORMS_OMAP5_H
+ 
+ #define REALTIME_COUNTER_BASE                   0x48243200
+ #define INCREMENTER_NUMERATOR_OFFSET            0x10
+-- 
+2.53.0
+
Signature · 6 lines
2.51.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 13 lines · Vincent Stehlé

Backport a patch from Xen 4.21 to fix the following build errors for Arm v7 with gcc-15:

xen-4.14.6/xen/include/asm/platforms/midway.h:1: error: header guard
'__ASM_ARM_PLATFORMS_MIDWAY_H' followed by '#define' of a different macro [-Werror=header-guard]
xen-4.14.6/xen/include/asm/platforms/omap5.h:1: error: header guard
'__ASM_ARM_PLATFORMS_OMAP5_H' followed by '#define' of a different macro [-Werror=header-guard]

Since the external 32b arm toolchain has been updated to a version based on gcc-15, the tests.package.test_xen.TestXenArmv7 python test does not build anymore.
Adding the patch repairs it.

Quoted 5 lines
Fixes 86d453a7dc08 ("toolchain/toolchain-external/toolchain-external-arm-arm: bump to 15.2.rel1")
Cc Alistair Francis <[email protected]>
Cc Dowan Gullient <[email protected]>

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Vincent Stehlé

In reply of:

Quoted 11 lines

Backport a patch from Xen 4.21 to fix the following build errors for Arm v7 with gcc-15:

xen-4.14.6/xen/include/asm/platforms/midway.h:1: error: header guard '__ASM_ARM_PLATFORMS_MIDWAY_H' followed by '#define' of a different macro [-Werror=header-guard] xen-4.14.6/xen/include/asm/platforms/omap5.h:1: error: header guard '__ASM_ARM_PLATFORMS_OMAP5_H' followed by '#define' of a different macro [-Werror=header-guard]

Since the external 32b arm toolchain has been updated to a version based on gcc-15, the tests.package.test_xen.TestXenArmv7 python test does not build anymore.
Adding the patch repairs it.

Quoted 5 lines
Fixes 86d453a7dc08 ("toolchain/toolchain-external/toolchain-external-arm-arm: bump to 15.2.rel1")
Cc Alistair Francis <[email protected]>
Cc Dowan Gullient <[email protected]>

Applied to 2026.02.x. Thanks

Quoted 64 lines
---
 ...9-Arm-platforms-fix-build-with-gcc15.patch | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/xen/0009-Arm-platforms-fix-build-with-gcc15.patch
package/xen/0009-Arm-platforms-fix-build-with-gcc15.patch new file +46 -0
new file mode 100644
index 0000000000..fb95ca9fa5
@@ -0,0 +1,46 @@
+From d12666d74dc742bb06c30b96d6b874a3e14c6b46 Mon Sep 17 00:00:00 2001
+From: Jan Beulich <[email protected]>
+Date: Tue, 26 Aug 2025 08:41:18 +0200
+Subject: [PATCH] Arm/platforms: fix build with gcc15
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For two of the headers gcc15 complains "header guard ... followed by
+'#define' of a different macro". Misra certainly wouldn't have liked
+this either, if these headers were covered by a scan.
+
+Signed-off-by: Jan Beulich <[email protected]>
+Acked-by: Michal Orzel <[email protected]>
+Upstream: https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=39f95089e2ba15c5438ce904c0cbbd8d79d3e6e7
+Signed-off-by: Vincent Stehlé <[email protected]>
+---
+ xen/include/asm-arm/platforms/midway.h | 2 +-
+ xen/include/asm-arm/platforms/omap5.h  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xen/include/asm-arm/platforms/midway.h b/xen/include/asm-arm/platforms/midway.h
+index 099e435..6914393 100644
+--- a/xen/include/asm-arm/platforms/midway.h
++++ b/xen/include/asm-arm/platforms/midway.h
+@@ -1,5 +1,5 @@
+ #ifndef __ASM_ARM_PLATFORMS_MIDWAY_H
+-#define __ASM_ASM_PLATFORMS_MIDWAY_H
++#define __ASM_ARM_PLATFORMS_MIDWAY_H
+ 
+ /* addresses of SREG registers for resetting the SoC */
+ #define MW_SREG_PWR_REQ             0xfff3cf00
+diff --git a/xen/include/asm-arm/platforms/omap5.h b/xen/include/asm-arm/platforms/omap5.h
+index c559c84..8867b45 100644
+--- a/xen/include/asm-arm/platforms/omap5.h
++++ b/xen/include/asm-arm/platforms/omap5.h
+@@ -1,5 +1,5 @@
+ #ifndef __ASM_ARM_PLATFORMS_OMAP5_H
+-#define __ASM_ASM_PLATFORMS_OMAP5_H
++#define __ASM_ARM_PLATFORMS_OMAP5_H
+ 
+ #define REALTIME_COUNTER_BASE                   0x48243200
+ #define INCREMENTER_NUMERATOR_OFFSET            0x10
+-- 
+2.53.0
+
Signature · 6 lines
2.51.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot