diff mbox series

python3-pygobject: fix compile error with old GCC

Message ID 20260123140228.1691924-1-ross.burton@arm.com
State New
Headers show
Series python3-pygobject: fix compile error with old GCC | expand

Commit Message

Ross Burton Jan. 23, 2026, 2:02 p.m. UTC
If the build is done with GCC 10 (eg a native build on Debian 11) then
the build fails:

  gi/pygi-resulttuple.c:337:1: error: label at end of compound statement

Backport a patch from upstream to add a missing semicolon.

[ YOCTO #16147 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../python/python3-pygobject/semicolon.patch  | 31 +++++++++++++++++++
 .../python/python3-pygobject_3.54.5.bb        |  2 ++
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-pygobject/semicolon.patch
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-pygobject/semicolon.patch b/meta/recipes-devtools/python/python3-pygobject/semicolon.patch
new file mode 100644
index 0000000000..54828d7707
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pygobject/semicolon.patch
@@ -0,0 +1,31 @@ 
+From d00ad09688e9dcc42020949e276741d3ae58c10d Mon Sep 17 00:00:00 2001
+From: Dan Yeaw <dan@yeaw.me>
+Date: Mon, 13 Oct 2025 21:45:22 -0400
+Subject: [PATCH] Fix syntax error for missing ;
+
+This fixes a compile error with older GCC, for example GCC 10 on Debian 11:
+
+  gi/pygi-resulttuple.c:337:1: error: label at end of compound statement
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ gi/pygi-resulttuple.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gi/pygi-resulttuple.c b/gi/pygi-resulttuple.c
+index 8b793e4d0..4d892e94d 100644
+--- a/gi/pygi-resulttuple.c
++++ b/gi/pygi-resulttuple.c
+@@ -335,7 +335,7 @@ resulttuple_dealloc (PyObject *self)
+     Py_TYPE (self)->tp_free (self);
+ 
+ done:
+-    CPy_TRASHCAN_END (self)
++    CPy_TRASHCAN_END (self);
+ }
+ #endif
+ 
+-- 
+GitLab
+
diff --git a/meta/recipes-devtools/python/python3-pygobject_3.54.5.bb b/meta/recipes-devtools/python/python3-pygobject_3.54.5.bb
index f6ed3ff5fb..8eb0f9fa6b 100644
--- a/meta/recipes-devtools/python/python3-pygobject_3.54.5.bb
+++ b/meta/recipes-devtools/python/python3-pygobject_3.54.5.bb
@@ -19,6 +19,8 @@  DEPENDS += "python3 glib-2.0"
 GNOME_COMPRESS_TYPE = "gz"
 GNOMEBN = "pygobject"
 
+SRC_URI += "file://semicolon.patch"
+
 SRC_URI[archive.sha256sum] = "b6656f6348f5245606cf15ea48c384c7f05156c75ead206c1b246c80a22fb585"
 
 S = "${UNPACKDIR}/${GNOMEBN}-${PV}"