summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/systemtap
diff options
context:
space:
mode:
authorVictor Kamensky <victor.kamensky7@gmail.com>2024-06-09 20:34:03 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-06-11 11:41:33 +0100
commit7ab949f94c93a76930d31cb9ad921b3a06c8ef2c (patch)
tree15d709ff51e6549b15d6224650ec330f9829fd48 /meta/recipes-kernel/systemtap
parentd6afc28dee7f7c7adfdac12e770deb9a9c04b116 (diff)
downloadpoky-7ab949f94c93a76930d31cb9ad921b3a06c8ef2c.tar.gz
systemtap: fix systemtap-native build error on Fedora 40
Backport of couple patches from upstream. (From OE-Core rev: cc486f26db46c562e35f770c16edf3f4035e536e) Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/systemtap')
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-elaborate.cxx-gcc-version-compatibility-hack-redux.patch32
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/0001-elaborate.cxx-gcc-version-compatibility-hack.patch52
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc2
3 files changed, 86 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-elaborate.cxx-gcc-version-compatibility-hack-redux.patch b/meta/recipes-kernel/systemtap/systemtap/0001-elaborate.cxx-gcc-version-compatibility-hack-redux.patch
new file mode 100644
index 0000000000..0c2888400d
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-elaborate.cxx-gcc-version-compatibility-hack-redux.patch
@@ -0,0 +1,32 @@
1From 91caf37e4dfe862f9b68447b1597c0d0f31523c3 Mon Sep 17 00:00:00 2001
2From: "Frank Ch. Eigler" <fche@redhat.com>
3Date: Tue, 7 May 2024 15:04:04 -0400
4Subject: [PATCH] elaborate.cxx: gcc version compatibility hack redux
5
6Note __GNUC__ >= 14 for this diagnostic.
7
8Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=91caf37e4dfe862f9b68447b1597c0d0f31523c3]
9Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
10---
11 elaborate.cxx | 2 ++
12 1 file changed, 2 insertions(+)
13
14diff --git a/elaborate.cxx b/elaborate.cxx
15index 88505559b..c08023f1d 100644
16--- a/elaborate.cxx
17+++ b/elaborate.cxx
18@@ -2656,9 +2656,11 @@ symresolution_info::symresolution_info (systemtap_session& s, bool omniscient_un
19 session (s), unmangled_p(omniscient_unmangled), current_function (0), current_probe (0)
20 {
21 #pragma GCC diagnostic push
22+ #if __GNUC__ >= 14
23 // c10s early snapshot GCC complains about this construct, which is
24 // made safe via our dtor usage
25 #pragma GCC diagnostic ignored "-Wdangling-pointer"
26+ #endif
27 saved_session_symbol_resolver = s.symbol_resolver;
28 s.symbol_resolver = this; // save resolver for early PR25841 function resolution
29 #pragma GCC diagnostic pop
30--
312.45.2
32
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-elaborate.cxx-gcc-version-compatibility-hack.patch b/meta/recipes-kernel/systemtap/systemtap/0001-elaborate.cxx-gcc-version-compatibility-hack.patch
new file mode 100644
index 0000000000..7cdcc93f14
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/0001-elaborate.cxx-gcc-version-compatibility-hack.patch
@@ -0,0 +1,52 @@
1From d11241bdd05bc4c745c8aef53a2725331e1a93b4 Mon Sep 17 00:00:00 2001
2From: "Frank Ch. Eigler" <fche@redhat.com>
3Date: Tue, 7 May 2024 14:25:12 -0400
4Subject: [PATCH] elaborate.cxx: gcc version compatibility hack
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Suppress -Wdangling-pointer for a construct that appears valid, but
10one particular GCC snapshot version complains about.
11
12In constructor ‘symresolution_info::symresolution_info(systemtap_session&, bool)’,
13inlined from ‘int semantic_pass_symbols(systemtap_session&)’ at ../systemtap/elaborate.cxx:1872:28:
14../systemtap/elaborate.cxx:2659:21: error: storing the address of local variable ‘sym’ in ‘*s.systemtap_session::symbol_resolver’ [-Werror=dangling-pointer=]
15 2659 | s.symbol_resolver = this; // save resolver for early PR25841 function resolution
16 | ~~~~~~~~~~~~~~~~~~^~~~~~
17../systemtap/elaborate.cxx: In function ‘int semantic_pass_symbols(systemtap_session&)’:
18../systemtap/elaborate.cxx:1872:22: note: ‘sym’ declared here
19 1872 | symresolution_info sym (s);
20 | ^~~
21../systemtap/elaborate.cxx:1870:43: note: ‘s’ declared here
22 1870 | semantic_pass_symbols (systemtap_session& s)
23 | ~~~~~~~~~~~~~~~~~~~^
24cc1plus: all warnings being treated as errors
25
26Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=d11241bdd05bc4c745c8aef53a2725331e1a93b4]
27Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
28---
29 elaborate.cxx | 5 +++++
30 1 file changed, 5 insertions(+)
31
32diff --git a/elaborate.cxx b/elaborate.cxx
33index 8bf9e6c06..88505559b 100644
34--- a/elaborate.cxx
35+++ b/elaborate.cxx
36@@ -2655,8 +2655,13 @@ semantic_pass (systemtap_session& s)
37 symresolution_info::symresolution_info (systemtap_session& s, bool omniscient_unmangled):
38 session (s), unmangled_p(omniscient_unmangled), current_function (0), current_probe (0)
39 {
40+ #pragma GCC diagnostic push
41+ // c10s early snapshot GCC complains about this construct, which is
42+ // made safe via our dtor usage
43+ #pragma GCC diagnostic ignored "-Wdangling-pointer"
44 saved_session_symbol_resolver = s.symbol_resolver;
45 s.symbol_resolver = this; // save resolver for early PR25841 function resolution
46+ #pragma GCC diagnostic pop
47 }
48
49
50--
512.45.2
52
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index cc9fc81430..80945ad7f8 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -7,6 +7,8 @@ SRC_URI = "git://sourceware.org/git/systemtap.git;branch=master;protocol=https \
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://0001-elaborate.cxx-gcc-version-compatibility-hack.patch \
11 file://0001-elaborate.cxx-gcc-version-compatibility-hack-redux.patch \
10 " 12 "
11 13
12COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux' 14COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux'