diff options
author | Victor Kamensky <victor.kamensky7@gmail.com> | 2024-06-09 20:34:03 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-06-11 11:41:33 +0100 |
commit | 7ab949f94c93a76930d31cb9ad921b3a06c8ef2c (patch) | |
tree | 15d709ff51e6549b15d6224650ec330f9829fd48 /meta/recipes-kernel/systemtap | |
parent | d6afc28dee7f7c7adfdac12e770deb9a9c04b116 (diff) | |
download | poky-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')
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 @@ | |||
1 | From 91caf37e4dfe862f9b68447b1597c0d0f31523c3 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Frank Ch. Eigler" <fche@redhat.com> | ||
3 | Date: Tue, 7 May 2024 15:04:04 -0400 | ||
4 | Subject: [PATCH] elaborate.cxx: gcc version compatibility hack redux | ||
5 | |||
6 | Note __GNUC__ >= 14 for this diagnostic. | ||
7 | |||
8 | Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=91caf37e4dfe862f9b68447b1597c0d0f31523c3] | ||
9 | Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com> | ||
10 | --- | ||
11 | elaborate.cxx | 2 ++ | ||
12 | 1 file changed, 2 insertions(+) | ||
13 | |||
14 | diff --git a/elaborate.cxx b/elaborate.cxx | ||
15 | index 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 | -- | ||
31 | 2.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 @@ | |||
1 | From d11241bdd05bc4c745c8aef53a2725331e1a93b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Frank Ch. Eigler" <fche@redhat.com> | ||
3 | Date: Tue, 7 May 2024 14:25:12 -0400 | ||
4 | Subject: [PATCH] elaborate.cxx: gcc version compatibility hack | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Suppress -Wdangling-pointer for a construct that appears valid, but | ||
10 | one particular GCC snapshot version complains about. | ||
11 | |||
12 | In constructor ‘symresolution_info::symresolution_info(systemtap_session&, bool)’, | ||
13 | inlined 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 | | ~~~~~~~~~~~~~~~~~~~^ | ||
24 | cc1plus: all warnings being treated as errors | ||
25 | |||
26 | Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=d11241bdd05bc4c745c8aef53a2725331e1a93b4] | ||
27 | Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com> | ||
28 | --- | ||
29 | elaborate.cxx | 5 +++++ | ||
30 | 1 file changed, 5 insertions(+) | ||
31 | |||
32 | diff --git a/elaborate.cxx b/elaborate.cxx | ||
33 | index 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 | -- | ||
51 | 2.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 | ||
12 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux' | 14 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux' |