Skip to content

Commit 9d0bafc

Browse files
trixmoehauke
authored andcommitted
uboot-tegra: 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. Signed-off-by: Trix Taiclet <git@trix.moe> Link: openwrt/openwrt#22870 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
1 parent 1e61a54 commit 9d0bafc

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From a63456b9191fae2fe49f4b121e025792022e3950 Mon Sep 17 00:00:00 2001
2+
From: Markus Volk <f_l_k@t-online.de>
3+
Date: Wed, 30 Oct 2024 06:07:16 +0100
4+
Subject: [PATCH] scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput
5+
MIME-Version: 1.0
6+
Content-Type: text/plain; charset=UTF-8
7+
Content-Transfer-Encoding: 8bit
8+
9+
Swig has changed language specific AppendOutput functions. The helper
10+
macro SWIG_AppendOutput remains unchanged. Use that instead
11+
of SWIG_Python_AppendOutput, which would require an extra parameter
12+
since swig 4.3.0.
13+
14+
/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds
15+
| scripts/dtc/pylibfdt/libfdt_wrap.c: In function '_wrap_fdt_next_node':
16+
| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function 'SWIG_Python_AppendOutput'
17+
| 5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val);
18+
| | ^~~~~~~~~~~~~~~~~~~~~~~~
19+
20+
Signed-off-by: Markus Volk <f_l_k@t-online.de>
21+
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
22+
Link: https://github.com/dgibson/dtc/pull/154
23+
---
24+
scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++---
25+
1 file changed, 3 insertions(+), 3 deletions(-)
26+
27+
--- a/scripts/dtc/pylibfdt/libfdt.i_shipped
28+
+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped
29+
@@ -1037,7 +1037,7 @@ typedef uint32_t fdt32_t;
30+
fdt_string(fdt1, fdt32_to_cpu($1->nameoff)));
31+
buff = PyByteArray_FromStringAndSize(
32+
(const char *)($1 + 1), fdt32_to_cpu($1->len));
33+
- resultobj = SWIG_Python_AppendOutput(resultobj, buff);
34+
+ resultobj = SWIG_AppendOutput(resultobj, buff);
35+
}
36+
}
37+
38+
@@ -1076,7 +1076,7 @@ typedef uint32_t fdt32_t;
39+
40+
%typemap(argout) int *depth {
41+
PyObject *val = Py_BuildValue("i", *arg$argnum);
42+
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
43+
+ resultobj = SWIG_AppendOutput(resultobj, val);
44+
}
45+
46+
%apply int *depth { int *depth };
47+
@@ -1092,7 +1092,7 @@ typedef uint32_t fdt32_t;
48+
if (PyTuple_GET_SIZE(resultobj) == 0)
49+
resultobj = val;
50+
else
51+
- resultobj = SWIG_Python_AppendOutput(resultobj, val);
52+
+ resultobj = SWIG_AppendOutput(resultobj, val);
53+
}
54+
}

0 commit comments

Comments
 (0)