summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2023-11-28 18:50:03 +0100
committerBruce Ashfield <bruce.ashfield@gmail.com>2023-12-04 21:03:57 +0000
commitedc85da6e4d22d5c71ab614658e62159b76e3c4c (patch)
tree64598ae0c1dc2b5c336005bdd87b0bfe7dbe134d /recipes-extended
parent1db447e785c5bf3d87d225bbe753bcc04fa3e22b (diff)
downloadmeta-virtualization-edc85da6e4d22d5c71ab614658e62159b76e3c4c.tar.gz
xen-tools: fix python 3.12 build errors
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/xen/files/0001-Config.mk-drop-Wdeclaration-after-statement.patch42
-rw-r--r--recipes-extended/xen/xen-tools_4.17.bb10
2 files changed, 47 insertions, 5 deletions
diff --git a/recipes-extended/xen/files/0001-Config.mk-drop-Wdeclaration-after-statement.patch b/recipes-extended/xen/files/0001-Config.mk-drop-Wdeclaration-after-statement.patch
new file mode 100644
index 00000000..dcfffb06
--- /dev/null
+++ b/recipes-extended/xen/files/0001-Config.mk-drop-Wdeclaration-after-statement.patch
@@ -0,0 +1,42 @@
1From 70e8b986fe78f5fbd1dfdef4f02ea9b50c7158db Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 28 Nov 2023 18:34:17 +0100
4Subject: [PATCH] Config.mk: drop -Wdeclaration-after-statement
5
6Such constructs are fully allowed by C99:
7https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Mixed-Labels-and-Declarations.html#Mixed-Labels-and-Declarations
8
9If the flag is present, then building against python 3.12 will fail thusly:
10
11| In file included from /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/Python.h:44,
12| from xen/lowlevel/xc/xc.c:8:
13| /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/object.h: In function 'Py_SIZE':
14| /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/object.h:233:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
15| 233 | PyVarObject *var_ob = _PyVarObject_CAST(ob);
16| | ^~~~~~~~~~~
17| In file included from /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/Python.h:53:
18| /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/cpython/longintrepr.h: In function '_PyLong_CompactValue':
19| /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/cpython/longintrepr.h:121:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
20| 121 | Py_ssize_t sign = 1 - (op->long_value.lv_tag & _PyLong_SIGN_MASK);
21| | ^~~~~~~~~~
22| cc1: all warnings being treated as errors
23
24Upstream-Status: Submitted [by email to xen-devel@lists.xenproject.org and maintainers printed by get_maintainer.pl]
25Signed-off-by: Alexander Kanavin <alex@linutronix.de>
26---
27 Config.mk | 2 --
28 1 file changed, 2 deletions(-)
29
30diff --git a/Config.mk b/Config.mk
31index 8bc2bcd5f6..09d5e8ebde 100644
32--- a/Config.mk
33+++ b/Config.mk
34@@ -173,8 +173,6 @@ CFLAGS += -std=gnu99
35
36 CFLAGS += -Wall -Wstrict-prototypes
37
38-$(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
39-$(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
40 $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)
41 $(call cc-option-add,CFLAGS,CC,-Wno-unused-local-typedefs)
42
diff --git a/recipes-extended/xen/xen-tools_4.17.bb b/recipes-extended/xen/xen-tools_4.17.bb
index c6a3052c..e011b87c 100644
--- a/recipes-extended/xen/xen-tools_4.17.bb
+++ b/recipes-extended/xen/xen-tools_4.17.bb
@@ -4,11 +4,11 @@ SRCREV ?= "322a20add00a4687cd46d9183616fa6fecbef81f"
4XEN_REL ?= "4.17" 4XEN_REL ?= "4.17"
5XEN_BRANCH ?= "stable-${XEN_REL}" 5XEN_BRANCH ?= "stable-${XEN_REL}"
6 6
7SRC_URI = " \ 7SRC_URI = "git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
8 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ 8 file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \
9 file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \ 9 file://0001-tools-xenstore-xenstored_control.c-correctly-print-t.patch \
10 file://0001-tools-xenstore-xenstored_control.c-correctly-print-t.patch \ 10 file://0001-Config.mk-drop-Wdeclaration-after-statement.patch \
11 " 11 "
12 12
13LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9" 13LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
14 14