summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/gperftools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-10-31 16:17:51 -0700
committerKhem Raj <raj.khem@gmail.com>2020-11-02 09:00:52 -0800
commitf3b1dd6a45c16b36aa8ee6ba94da60267a798757 (patch)
treeb55382fd9649a722c76609e277187447d0299ce9 /meta-oe/recipes-support/gperftools
parent0500b364b284b694a75e4fe7df2482950502eddc (diff)
downloadmeta-openembedded-f3b1dd6a45c16b36aa8ee6ba94da60267a798757.tar.gz
gperftools: Fix build with new musl updates
Latest musl shows build failures e.g. ../git/src/profile-handler.cc:275:8: error: no member named '_sigev_un' in 'sigevent' sevp._sigev_un._tid = sys_gettid(); ~~~~ ^ Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/gperftools')
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools/0001-profile-handler-Specify-libc-specific-thread_id.patch38
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools_2.8.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-profile-handler-Specify-libc-specific-thread_id.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-profile-handler-Specify-libc-specific-thread_id.patch
new file mode 100644
index 000000000..4029a69c5
--- /dev/null
+++ b/meta-oe/recipes-support/gperftools/gperftools/0001-profile-handler-Specify-libc-specific-thread_id.patch
@@ -0,0 +1,38 @@
1From 0a504852ed6e56620d1df26b503c4aa2b5b74760 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 31 Oct 2020 16:12:36 -0700
4Subject: [PATCH] profile-handler: Specify libc specific thread_id
5
6We need to know internal _sigev_un is glibc specific, add an else for
7musl case
8
9Fixes build issue
10../git/src/profile-handler.cc:275:8: error: no member named '_sigev_un' in 'sigevent'
11 sevp._sigev_un._tid = sys_gettid();
12 ~~~~ ^
13
14Upstream-Status: Pending
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 src/profile-handler.cc | 4 ++++
18 1 file changed, 4 insertions(+)
19
20diff --git a/src/profile-handler.cc b/src/profile-handler.cc
21index 7fdcb69..5867118 100644
22--- a/src/profile-handler.cc
23+++ b/src/profile-handler.cc
24@@ -272,7 +272,11 @@ static void StartLinuxThreadTimer(int timer_type, int signal_number,
25 struct itimerspec its;
26 memset(&sevp, 0, sizeof(sevp));
27 sevp.sigev_notify = SIGEV_THREAD_ID;
28+#ifdef __GLIBC__
29 sevp._sigev_un._tid = sys_gettid();
30+#else
31+ sevp.sigev_notify_thread_id = sys_gettid();
32+#endif
33 sevp.sigev_signo = signal_number;
34 clockid_t clock = CLOCK_THREAD_CPUTIME_ID;
35 if (timer_type == ITIMER_REAL) {
36--
372.29.2
38
diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.8.bb b/meta-oe/recipes-support/gperftools/gperftools_2.8.bb
index 662777b47..d9b310bce 100644
--- a/meta-oe/recipes-support/gperftools/gperftools_2.8.bb
+++ b/meta-oe/recipes-support/gperftools/gperftools_2.8.bb
@@ -10,6 +10,7 @@ SRC_URI = "git://github.com/gperftools/gperftools \
10 file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \ 10 file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \
11 file://disable_libunwind_aarch64.patch \ 11 file://disable_libunwind_aarch64.patch \
12 file://sgidef.patch \ 12 file://sgidef.patch \
13 file://0001-profile-handler-Specify-libc-specific-thread_id.patch \
13 " 14 "
14 15
15inherit autotools 16inherit autotools