]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemtap: Disable dangling-pointer warning
authorKhem Raj <raj.khem@gmail.com>
Tue, 14 Mar 2023 18:00:04 +0000 (11:00 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 17 Mar 2023 17:16:58 +0000 (17:16 +0000)
This is to fix build in RISCV64

| In constructor 'symresolution_info::symresolution_info(systemtap_session&, bool)',
|     inlined from 'int semantic_pass_symbols(systemtap_session&)' at ../git/elaborate.cxx:1884:28:
| ../git/elaborate.cxx:2601:21: error: storing the address of local variable 'sym' in '*s.systemtap_session::symbol_resolver' [-Werror=dangling-pointer=]
|  2601 |   s.symbol_resolver = this; // save resolver for early PR25841 function resolution
|       |   ~~~~~~~~~~~~~~~~~~^~~~~~
| ../git/elaborate.cxx: In function 'int semantic_pass_symbols(systemtap_session&)':
| ../git/elaborate.cxx:1884:22: note: 'sym' declared here
|  1884 |   symresolution_info sym (s);
|       |                      ^~~
| ../git/elaborate.cxx:1884:22: note: 's' declared here

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/systemtap/systemtap_git.bb

index 072fcb310a8894b4f8e609fc8488d6d98401b3d4..d320a8a5e095de7a8c9ebba8691d635a2aa80d73 100644 (file)
@@ -34,6 +34,9 @@ PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,
 inherit autotools gettext pkgconfig systemd
 inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
 
+# | ../git/elaborate.cxx:2601:21: error: storing the address of local variable 'sym' in '*s.systemtap_session::symbol_resolver' [-Werror=dangling-pointer=]
+CXXFLAGS += "-Wno-dangling-pointer"
+
 # exporter comes with python3-probes
 PACKAGES =+ "${PN}-exporter"
 FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \