diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-05-28 17:57:31 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-05-31 07:48:02 -0700 |
commit | e8262bab723b98ef094f680d49c8c0bcc136e0e9 (patch) | |
tree | 5178624fe4c824d5d4accbdaafc56da6c339262c /meta-oe/recipes-devtools | |
parent | b41e80c15e7161bef2723bbe898ea7b961bea170 (diff) | |
download | meta-openembedded-contrib-e8262bab723b98ef094f680d49c8c0bcc136e0e9.tar.gz |
heaptrack: Fix build with clang and llvm libunwind
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r-- | meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch | 41 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch b/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch new file mode 100644 index 0000000000..a6547eded8 --- /dev/null +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack/0001-track-Check-for-unw_set_caching_policy-before-using.patch @@ -0,0 +1,41 @@ +From bcfc4c8d7dc70bd81367c183a68cc9ee02ab4744 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 28 May 2021 17:52:57 -0700 +Subject: [PATCH] track: Check for unw_set_caching_policy before using + +llvm libunwind does not implement unw_cache_* functions yet +Include inttypes.h got PRI* macros + +Upstream-Status: Submitted [https://github.com/KDE/heaptrack/pull/33] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/track/trace_libunwind.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/track/trace_libunwind.cpp b/src/track/trace_libunwind.cpp +index c76337c..96b2176 100644 +--- a/src/track/trace_libunwind.cpp ++++ b/src/track/trace_libunwind.cpp +@@ -26,6 +26,7 @@ + + #define UNW_LOCAL_ONLY + #include <libunwind.h> ++#include <inttypes.h> + + #include <stdio.h> + +@@ -60,9 +61,11 @@ void Trace::print() + void Trace::setup() + { + // configure libunwind for better speed ++#if UNW_CACHE_PER_THREAD + if (unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD)) { + fprintf(stderr, "WARNING: Failed to enable per-thread libunwind caching.\n"); + } ++#endif + #if LIBUNWIND_HAS_UNW_SET_CACHE_SIZE + if (unw_set_cache_size(unw_local_addr_space, 1024, 0)) { + fprintf(stderr, "WARNING: Failed to set libunwind cache size.\n"); +-- +2.31.1 + diff --git a/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb b/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb index f2235afef3..207c45284f 100644 --- a/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb +++ b/meta-oe/recipes-devtools/heaptrack/heaptrack_1.2.0.bb @@ -14,6 +14,7 @@ SRC_URI = "git://github.com/KDE/heaptrack.git;protocol=https \ file://0002-heaptrack_inject-Include-dlfcn.h-for-dlopen-dlclose.patch \ file://0003-heaptrack_preload-Make-noexcept-attribute-conditiona.patch \ file://0004-backtrace-Always-include-stdint.h.patch \ + file://0001-track-Check-for-unw_set_caching_policy-before-using.patch \ " SRCREV = "bc9e3744bcc47de978673d1e382f4125a1ab5fa8" |