summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch')
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch38
1 files changed, 8 insertions, 30 deletions
diff --git a/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch b/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch
index 3034e2017..800fa3a84 100644
--- a/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch
+++ b/meta-oe/recipes-support/gperftools/gperftools/ppc-musl.patch
@@ -6,49 +6,27 @@ Subject: [PATCH] Compatibility fixes for musl.
6--- 6---
7Upstream-Status: Pending 7Upstream-Status: Pending
8 8
9 m4/pc_from_ucontext.m4 | 4 +++- 9 src/getpc.h | 4 ++++
10 src/getpc.h | 3 +++
11 src/stacktrace_powerpc-linux-inl.h | 8 ++++++-- 10 src/stacktrace_powerpc-linux-inl.h | 8 ++++++--
12 3 files changed, 12 insertions(+), 3 deletions(-) 11 2 files changed, 10 insertions(+), 2 deletions(-)
13 12
14diff --git a/m4/pc_from_ucontext.m4 b/m4/pc_from_ucontext.m4
15index 7f09dd7..5f4ee8c 100644
16--- a/m4/pc_from_ucontext.m4
17+++ b/m4/pc_from_ucontext.m4
18@@ -34,6 +34,7 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT],
19 pc_fields="$pc_fields uc_mcontext.gregs[[R15]]" # Linux (arm old [untested])
20 pc_fields="$pc_fields uc_mcontext.arm_pc" # Linux (arm arch 5)
21 pc_fields="$pc_fields uc_mcontext.gp_regs[[PT_NIP]]" # Suse SLES 11 (ppc64)
22+ pc_fields="$pc_fields uc_mcontext.gregs[[PT_NIP]]"
23 pc_fields="$pc_fields uc_mcontext.mc_eip" # FreeBSD (i386)
24 pc_fields="$pc_fields uc_mcontext.mc_srr0" # FreeBSD (powerpc, powerpc64)
25 pc_fields="$pc_fields uc_mcontext.mc_rip" # FreeBSD (x86_64 [untested])
26@@ -77,7 +78,8 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT],
27 pc_field_found=true)
28 elif test "x$ac_cv_header_ucontext_h" = xyes; then
29 AC_TRY_COMPILE([#define _GNU_SOURCE 1
30- #include <ucontext.h>],
31+ #include <ucontext.h>
32+ #include <asm/ptrace.h>],
33 [ucontext_t u; return u.$pc_field == 0;],
34 AC_DEFINE_UNQUOTED(PC_FROM_UCONTEXT, $pc_field,
35 How to access the PC from a struct ucontext)
36diff --git a/src/getpc.h b/src/getpc.h 13diff --git a/src/getpc.h b/src/getpc.h
37index 9605363..cd8ccfa 100644 14index 87d18b6..c569731 100644
38--- a/src/getpc.h 15--- a/src/getpc.h
39+++ b/src/getpc.h 16+++ b/src/getpc.h
40@@ -68,6 +68,9 @@ 17@@ -68,6 +68,10 @@
41 typedef ucontext ucontext_t; 18 typedef ucontext ucontext_t;
42 #endif 19 #endif
43 20
44+#if defined(__powerpc__) && !defined(PT_NIP) 21+#if defined(__powerpc__) && !defined(PT_NIP)
45+#define PT_NIP 32 22+#define PT_NIP 32
46+#endif 23+#endif
24+
25 namespace tcmalloc {
26 namespace getpc {
47 27
48 // Take the example where function Foo() calls function Bar(). For
49 // many architectures, Bar() is responsible for setting up and tearing
50diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h 28diff --git a/src/stacktrace_powerpc-linux-inl.h b/src/stacktrace_powerpc-linux-inl.h
51index a301a46..efca426 100644 29index 883e7d2..212bd25 100644
52--- a/src/stacktrace_powerpc-linux-inl.h 30--- a/src/stacktrace_powerpc-linux-inl.h
53+++ b/src/stacktrace_powerpc-linux-inl.h 31+++ b/src/stacktrace_powerpc-linux-inl.h
54@@ -186,7 +186,7 @@ static int GET_STACK_TRACE_OR_FRAMES { 32@@ -186,7 +186,7 @@ static int GET_STACK_TRACE_OR_FRAMES {