summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrix Taiclet2025-11-03 09:37:05 +0000
committerHauke Mehrtens2025-11-09 22:00:44 +0000
commit71b5de61aecf49ca1522b3f549631417c67e73d0 (patch)
treef42767284bc0ee40aa7c68be5fbd7f5a25cee75e
parentef93221841b54956bd5022d746b1367d24999b7d (diff)
downloadopenwrt-71b5de61aecf49ca1522b3f549631417c67e73d0.tar.gz
uboot-d1: fix build with swig 4.3.0
Swig 4.3.0 has changed SWIG_Python_AppendOutput, which now requires an additional parameter `is_void`. SWIG_AppendOutput remains unchanged. This was fixed upstream in u-boot/u-boot@a63456b ``` scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’: scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’ 5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val); | ^~~~~~~~~~~~~~~~~~~~~~~~ ``` This is the same fix as applied in 363e07d. Fixes: #20619 Link: #20620 Signed-off-by: Trix Taiclet <trix@c3l.lu> Link: https://github.com/openwrt/openwrt/pull/20620 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--package/boot/uboot-d1/patches/310-fix-swig-4-3-0-SWIG_AppendOutput-keeps-signature.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/package/boot/uboot-d1/patches/310-fix-swig-4-3-0-SWIG_AppendOutput-keeps-signature.patch b/package/boot/uboot-d1/patches/310-fix-swig-4-3-0-SWIG_AppendOutput-keeps-signature.patch
new file mode 100644
index 0000000000..a78b64d5ee
--- /dev/null
+++ b/package/boot/uboot-d1/patches/310-fix-swig-4-3-0-SWIG_AppendOutput-keeps-signature.patch
@@ -0,0 +1,57 @@
+From a63456b9191fae2fe49f4b121e025792022e3950 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Wed, 30 Oct 2024 06:07:16 +0100
+Subject: [PATCH] scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Swig has changed language specific AppendOutput functions. The helper
+macro SWIG_AppendOutput remains unchanged. Use that instead
+of SWIG_Python_AppendOutput, which would require an extra parameter
+since swig 4.3.0.
+
+/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
+| scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’:
+| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’
+| 5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
+| | ^~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
+Link: https://github.com/dgibson/dtc/pull/154
+---
+ scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/dtc/pylibfdt/libfdt.i_shipped b/scripts/dtc/pylibfdt/libfdt.i_shipped
+index 56cc5d48f4f9..e4659489a96a 100644
+--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
++++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
+@@ -1037,7 +1037,7 @@ typedef uint32_t fdt32_t;
+ fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
+ buff = PyByteArray_FromStringAndSize(
+ (const char *)($1 + 1), fdt32_to_cpu($1->len));
+- resultobj = SWIG_Python_AppendOutput(resultobj, buff);
++ resultobj = SWIG_AppendOutput(resultobj, buff);
+ }
+ }
+
+@@ -1076,7 +1076,7 @@ typedef uint32_t fdt32_t;
+
+ %typemap(argout) int *depth {
+ PyObject *val = Py_BuildValue("i", *arg$argnum);
+- resultobj = SWIG_Python_AppendOutput(resultobj, val);
++ resultobj = SWIG_AppendOutput(resultobj, val);
+ }
+
+ %apply int *depth { int *depth };
+@@ -1092,7 +1092,7 @@ typedef uint32_t fdt32_t;
+ if (PyTuple_GET_SIZE(resultobj) == 0)
+ resultobj = val;
+ else
+- resultobj = SWIG_Python_AppendOutput(resultobj, val);
++ resultobj = SWIG_AppendOutput(resultobj, val);
+ }
+ }
+