File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,8 +89,21 @@ if (${STACK_DETAILS_AUTO_DETECT})
8989 # find libdw
9090 find_path (LIBDW_INCLUDE_DIR NAMES "elfutils/libdw.h" "elfutils/libdwfl.h" )
9191 find_library (LIBDW_LIBRARY dw )
92+ # in case it's statically linked, look for all the possible dependencies
93+ find_library (LIBELF_LIBRARY elf )
94+ find_library (LIBPTHREAD_LIBRARY pthread )
95+ find_library (LIBZ_LIBRARY z )
96+ find_library (LIBBZ2_LIBRARY bz2 )
97+ find_library (LIBLZMA_LIBRARY lzma )
98+ find_library (LIBZSTD_LIBRARY zstd )
9299 set (LIBDW_INCLUDE_DIRS ${LIBDW_INCLUDE_DIR} )
93- set (LIBDW_LIBRARIES ${LIBDW_LIBRARY} )
100+ set (LIBDW_LIBRARIES ${LIBDW_LIBRARY}
101+ $<$<BOOL :${LIBELF_LIBRARY} >:${LIBELF_LIBRARY} >
102+ $<$<BOOL :${LIBPTHREAD_LIBRARY} >:${LIBPTHREAD_LIBRARY} >
103+ $<$<BOOL :${LIBZ_LIBRARY} >:${LIBZ_LIBRARY} >
104+ $<$<BOOL :${LIBBZ2_LIBRARY} >:${LIBBZ2_LIBRARY} >
105+ $<$<BOOL :${LIBLZMA_LIBRARY} >:${LIBLZMA_LIBRARY} >
106+ $<$<BOOL :${LIBZSTD_LIBRARY} >:${LIBZSTD_LIBRARY} >)
94107 find_package_handle_standard_args (libdw ${_name_mismatched_arg}
95108 REQUIRED_VARS LIBDW_LIBRARY LIBDW_INCLUDE_DIR)
96109 mark_as_advanced (LIBDW_INCLUDE_DIR LIBDW_LIBRARY )
Original file line number Diff line number Diff line change 211211#else
212212#include < link.h>
213213#endif
214+ #if defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || \
215+ defined (__POWERPC__)
216+ // Linux kernel header required for the struct pt_regs definition
217+ // to access the NIP (Next Instruction Pointer) register value
218+ #include < asm/ptrace.h>
219+ #endif
214220#include < signal.h>
215221#include < sys/stat.h>
216222#include < syscall.h>
You can’t perform that action at this time.
0 commit comments