From 9df4838fe91e437ae990b3ef7de37eead326dd6b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 22 Aug 2022 10:10:08 +0200 Subject: systemtap: add a patch to address a python 3.11 failure (From OE-Core rev: df312a4c8ad84a9d12c4eec94d48a66420c8988b) Signed-off-by: Alexander Kanavin Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- .../systemtap/systemtap/python-3.11.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 meta/recipes-kernel/systemtap/systemtap/python-3.11.patch (limited to 'meta/recipes-kernel/systemtap/systemtap') 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 @@ +From 069e109c95d1afca17cd3781b39f220cf8b39978 Mon Sep 17 00:00:00 2001 +From: Stan Cox +Date: Wed, 13 Jul 2022 09:49:51 -0400 +Subject: [PATCH 1/1] python 3.11 removed direct access to PyFrameObject + members + +Take into account the change in PyFrameObject definition to allow +building systemtap with python 3.11. Additional support for python +3.11 is forthcoming. + +Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=069e109c95d1afca17cd3781b39f220cf8b39978] +Signed-off-by: Alexander Kanavin +--- + python/HelperSDT/_HelperSDT.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/python/HelperSDT/_HelperSDT.c b/python/HelperSDT/_HelperSDT.c +index 967cb6077..4d287132e 100644 +--- a/python/HelperSDT/_HelperSDT.c ++++ b/python/HelperSDT/_HelperSDT.c +@@ -14,7 +14,13 @@ + // PR25841: ensure that the libHelperSDT.so file contains debuginfo + // for the tapset helper functions, so they don't have to look into libpython* + #include ++// python 3.11 removed direct access to PyFrameObject members ++// https://docs.python.org/3.11/whatsnew/3.11.html#c-api-changes ++#if PY_MAJOR_VERSION <= 3 && PY_MINOR_VERSION < 11 + PyFrameObject _dummy_frame; ++#else ++//PyFrameObject *_dummy_frame; ++#endif + #include + PyVarObject _dummy_var; + #include +-- +2.31.1 + -- cgit v1.2.3-54-g00ecf