1 |
commit: 29741bb4addc99eb6271754698151704cfebbec3 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 1 04:08:36 2018 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 1 04:11:31 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29741bb4 |
7 |
|
8 |
sys-libs/libunwind: fix compilation with musl |
9 |
|
10 |
Package-Manager: Portage-2.3.41, Repoman-2.3.9 |
11 |
|
12 |
....2.1-only-include-execinfo_h-if-avaliable.patch | 51 ++++++++++++++++++++++ |
13 |
sys-libs/libunwind/libunwind-1.2.1-r1.ebuild | 1 + |
14 |
2 files changed, 52 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch b/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..ee11149771c |
19 |
--- /dev/null |
20 |
+++ b/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch |
21 |
@@ -0,0 +1,51 @@ |
22 |
+From 0f3f41a86842f2b19aa07af5242cb775ef9b20d3 Mon Sep 17 00:00:00 2001 |
23 |
+From: "Jory A. Pratt" <anarchy@g.o> |
24 |
+Date: Sat, 30 Jun 2018 22:44:22 -0500 |
25 |
+Subject: [PATCH] Only include execinfo.h where avaliable |
26 |
+ |
27 |
+Signed-off-by: Jory A. Pratt <anarchy@g.o> |
28 |
+--- |
29 |
+ tests/test-coredump-unwind.c | 8 ++++++-- |
30 |
+ 1 file changed, 6 insertions(+), 2 deletions(-) |
31 |
+ |
32 |
+diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c |
33 |
+index 5254708..33f92b0 100644 |
34 |
+--- a/tests/test-coredump-unwind.c |
35 |
++++ b/tests/test-coredump-unwind.c |
36 |
+@@ -57,7 +57,9 @@ |
37 |
+ #include <grp.h> |
38 |
+ |
39 |
+ /* For SIGSEGV handler code */ |
40 |
++#if HAVE_EXECINFO_H |
41 |
+ #include <execinfo.h> |
42 |
++#endif |
43 |
+ #include <sys/ucontext.h> |
44 |
+ |
45 |
+ #include <libunwind-coredump.h> |
46 |
+@@ -202,7 +204,7 @@ void die_out_of_memory(void) |
47 |
+ /* End of utility logging functions */ |
48 |
+ |
49 |
+ |
50 |
+- |
51 |
++#if HAVE_EXECINFO_H |
52 |
+ static |
53 |
+ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext) |
54 |
+ { |
55 |
+@@ -249,12 +251,14 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext) |
56 |
+ |
57 |
+ _exit(1); |
58 |
+ } |
59 |
+- |
60 |
++#endif |
61 |
+ static void install_sigsegv_handler(void) |
62 |
+ { |
63 |
+ struct sigaction sa; |
64 |
+ memset(&sa, 0, sizeof(sa)); |
65 |
++#if HAVE_EXECINFO_H |
66 |
+ sa.sa_sigaction = handle_sigsegv; |
67 |
++#endif |
68 |
+ sa.sa_flags = SA_SIGINFO; |
69 |
+ sigaction(SIGSEGV, &sa, NULL); |
70 |
+ sigaction(SIGILL, &sa, NULL); |
71 |
+-- |
72 |
+2.18.0 |
73 |
|
74 |
diff --git a/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild b/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild |
75 |
index 8bdde358d13..a4690fc050e 100644 |
76 |
--- a/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild |
77 |
+++ b/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild |
78 |
@@ -48,6 +48,7 @@ PATCHES=( |
79 |
"${FILESDIR}"/${PN}-1.2-ia64-ptrace-coredump.patch |
80 |
"${FILESDIR}"/${PN}-1.2-ia64-missing.patch |
81 |
"${FILESDIR}"/${PN}-1.2.1-fix_version_macros.patch |
82 |
+ "${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch |
83 |
) |
84 |
|
85 |
src_prepare() { |