Skip to content

Commit 9a5ba15

Browse files
committed
Merge bitcoin/bitcoin#33310: trace: Workaround GCC bug compiling with old systemtap
93a29ff trace: Workaround GCC bug compiling with old systemtap (Luke Dashjr) Pull request description: ACKs for top commit: 0xB10C: lgtm ACK 93a29ff - I did not test this. Tree-SHA512: 9ce9ed8b7733af721134462073a3417e52d67e9e9853eebbddfa795842b381de98e28756ebfa6652536cbfdd08181142eccd198f4dc00a57d8748801b362b4b7
2 parents 853f0d8 + 93a29ff commit 9a5ba15

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

cmake/module/FindUSDT.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ if(USDT_INCLUDE_DIR)
3636
include(CheckCXXSourceCompiles)
3737
set(CMAKE_REQUIRED_INCLUDES ${USDT_INCLUDE_DIR})
3838
check_cxx_source_compiles("
39+
#if defined(__arm__)
40+
# define STAP_SDT_ARG_CONSTRAINT g
41+
#endif
42+
3943
// Setting SDT_USE_VARIADIC lets systemtap (sys/sdt.h) know that we want to use
4044
// the optional variadic macros to define tracepoints.
4145
#define SDT_USE_VARIADIC 1

src/util/trace.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99

1010
#ifdef ENABLE_TRACING
1111

12+
// Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103395
13+
// systemtap 4.6 on 32-bit ARM triggers internal compiler error
14+
// (this workaround is included in systemtap 4.7+)
15+
#if defined(__arm__)
16+
# define STAP_SDT_ARG_CONSTRAINT g
17+
#endif
18+
1219
// Setting SDT_USE_VARIADIC lets systemtap (sys/sdt.h) know that we want to use
1320
// the optional variadic macros to define tracepoints.
1421
#define SDT_USE_VARIADIC 1

0 commit comments

Comments
 (0)