[openwrt/openwrt] uboot-rockchip: fix build with swig 4.3.0
LEDE Commits
lede-commits at lists.infradead.org
Mon Dec 23 12:26:02 PST 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4e68103c4eb93d3f9b9359742c3c377ee2844943
commit 4e68103c4eb93d3f9b9359742c3c377ee2844943
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Mon Dec 23 21:57:15 2024 +0800
uboot-rockchip: fix build with swig 4.3.0
Fixes the following error by backporting upstream update:
```
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);
| ^~~~~~~~~~~~~~~~~~~~~~~~
```
Fixes: https://github.com/openwrt/openwrt/issues/17345
Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17352
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
...bfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch b/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch
new file mode 100644
index 0000000000..f5beca8d77
--- /dev/null
+++ b/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch
@@ -0,0 +1,55 @@
+From a63456b9191fae2fe49f4b121e025792022e3950 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k at 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 at t-online.de>
+Reported-by: Rudi Heitbaum <rudi at heitbaum.com>
+Link: https://github.com/dgibson/dtc/pull/154
+---
+ scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- 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);
+ }
+ }
+
More information about the lede-commits
mailing list