summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-08-22 10:10:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-23 15:48:55 +0100
commit9df4838fe91e437ae990b3ef7de37eead326dd6b (patch)
tree054311f117631d1c2a1d12a04710b71d692d939b
parentdfc3931eb060336279e6e5ce9c254166d453cb91 (diff)
downloadpoky-9df4838fe91e437ae990b3ef7de37eead326dd6b.tar.gz
systemtap: add a patch to address a python 3.11 failure
(From OE-Core rev: df312a4c8ad84a9d12c4eec94d48a66420c8988b) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/python-3.11.patch37
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/python-3.11.patch b/meta/recipes-kernel/systemtap/systemtap/python-3.11.patch
new file mode 100644
index 0000000000..6e0c97b8d6
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/python-3.11.patch
@@ -0,0 +1,37 @@
1From 069e109c95d1afca17cd3781b39f220cf8b39978 Mon Sep 17 00:00:00 2001
2From: Stan Cox <scox@redhat.com>
3Date: Wed, 13 Jul 2022 09:49:51 -0400
4Subject: [PATCH 1/1] python 3.11 removed direct access to PyFrameObject
5 members
6
7Take into account the change in PyFrameObject definition to allow
8building systemtap with python 3.11. Additional support for python
93.11 is forthcoming.
10
11Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=069e109c95d1afca17cd3781b39f220cf8b39978]
12Signed-off-by: Alexander Kanavin <alex@linutronix.de>
13---
14 python/HelperSDT/_HelperSDT.c | 6 ++++++
15 1 file changed, 6 insertions(+)
16
17diff --git a/python/HelperSDT/_HelperSDT.c b/python/HelperSDT/_HelperSDT.c
18index 967cb6077..4d287132e 100644
19--- a/python/HelperSDT/_HelperSDT.c
20+++ b/python/HelperSDT/_HelperSDT.c
21@@ -14,7 +14,13 @@
22 // PR25841: ensure that the libHelperSDT.so file contains debuginfo
23 // for the tapset helper functions, so they don't have to look into libpython*
24 #include <frameobject.h>
25+// python 3.11 removed direct access to PyFrameObject members
26+// https://docs.python.org/3.11/whatsnew/3.11.html#c-api-changes
27+#if PY_MAJOR_VERSION <= 3 && PY_MINOR_VERSION < 11
28 PyFrameObject _dummy_frame;
29+#else
30+//PyFrameObject *_dummy_frame;
31+#endif
32 #include <object.h>
33 PyVarObject _dummy_var;
34 #include <dictobject.h>
35--
362.31.1
37
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 2b79aa8fca..b05a5a2b0d 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -7,6 +7,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git;branch=master \
7 file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \ 7 file://0001-Do-not-let-configure-write-a-python-location-into-th.patch \
8 file://0001-Install-python-modules-to-correct-library-dir.patch \ 8 file://0001-Install-python-modules-to-correct-library-dir.patch \
9 file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ 9 file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \
10 file://python-3.11.patch \
10 " 11 "
11 12
12COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux' 13COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux'