summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzangrc <zangrc.fnst@cn.fujitsu.com>2020-11-21 00:29:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-24 10:27:45 +0000
commit0675b7c9e82dfb5c4830a15427dea4a7a4acde7c (patch)
treeff0d3b7da669dcee7ab13329ab2cf19e51e14875
parent5b473ae4242f2ccf9bc4a83b8238b7ca41615975 (diff)
downloadpoky-0675b7c9e82dfb5c4830a15427dea4a7a4acde7c.tar.gz
libunwind: upgrade 1.4.0 -> 1.5.0
0001-Fix-compilation-with-fno-common.patch 0002-backtrace-Use-only-with-glibc-and-uclibc.patch sigset_t.patch Removed since these are included in 1.5.0 (From OE-Core rev: 51c237a4d30d7baad7aa717368ed358059d52843) Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-Fix-compilation-with-fno-common.patch448
-rw-r--r--meta/recipes-support/libunwind/libunwind/0002-backtrace-Use-only-with-glibc-and-uclibc.patch45
-rw-r--r--meta/recipes-support/libunwind/libunwind/sigset_t.patch28
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.5.0.bb (renamed from meta/recipes-support/libunwind/libunwind_1.4.0.bb)7
4 files changed, 2 insertions, 526 deletions
diff --git a/meta/recipes-support/libunwind/libunwind/0001-Fix-compilation-with-fno-common.patch b/meta/recipes-support/libunwind/libunwind/0001-Fix-compilation-with-fno-common.patch
deleted file mode 100644
index e11487fe97..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0001-Fix-compilation-with-fno-common.patch
+++ /dev/null
@@ -1,448 +0,0 @@
1From 00d18b21dcb9723c4f13889a39a760a654782370 Mon Sep 17 00:00:00 2001
2From: Yichao Yu <yyc1992@gmail.com>
3Date: Tue, 31 Mar 2020 00:43:32 -0400
4Subject: [PATCH] Fix compilation with -fno-common.
5
6Making all other archs consistent with IA64 which should not have this problem.
7Also move the FIXME to the correct place.
8
9Also add some minimum comments about this...
10
11Upstream-Status: Backport [https://github.com/libunwind/libunwind/pull/166]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 src/aarch64/Ginit.c | 15 +++++++--------
15 src/arm/Ginit.c | 15 +++++++--------
16 src/coredump/_UPT_get_dyn_info_list_addr.c | 5 +++++
17 src/hppa/Ginit.c | 15 +++++++--------
18 src/ia64/Ginit.c | 1 +
19 src/mi/Gfind_dynamic_proc_info.c | 1 +
20 src/mips/Ginit.c | 15 +++++++--------
21 src/ppc32/Ginit.c | 11 +++++++----
22 src/ppc64/Ginit.c | 11 +++++++----
23 src/ptrace/_UPT_get_dyn_info_list_addr.c | 5 +++++
24 src/s390x/Ginit.c | 15 +++++++--------
25 src/sh/Ginit.c | 15 +++++++--------
26 src/tilegx/Ginit.c | 15 +++++++--------
27 src/x86/Ginit.c | 15 +++++++--------
28 src/x86_64/Ginit.c | 15 +++++++--------
29 15 files changed, 89 insertions(+), 80 deletions(-)
30
31diff --git a/src/aarch64/Ginit.c b/src/aarch64/Ginit.c
32index dec235c..3538976 100644
33--- a/src/aarch64/Ginit.c
34+++ b/src/aarch64/Ginit.c
35@@ -61,13 +61,6 @@ tdep_uc_addr (unw_tdep_context_t *uc, int reg)
36
37 # endif /* UNW_LOCAL_ONLY */
38
39-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
40-
41-/* XXX fix me: there is currently no way to locate the dyn-info list
42- by a remote unwinder. On ia64, this is done via a special
43- unwind-table entry. Perhaps something similar can be done with
44- DWARF2 unwind info. */
45-
46 static void
47 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
48 {
49@@ -78,7 +71,13 @@ static int
50 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
51 void *arg)
52 {
53- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
54+#ifndef UNW_LOCAL_ONLY
55+# pragma weak _U_dyn_info_list_addr
56+ if (!_U_dyn_info_list_addr)
57+ return -UNW_ENOINFO;
58+#endif
59+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
60+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
61 return 0;
62 }
63
64diff --git a/src/arm/Ginit.c b/src/arm/Ginit.c
65index 2720d06..0bac0d7 100644
66--- a/src/arm/Ginit.c
67+++ b/src/arm/Ginit.c
68@@ -57,18 +57,17 @@ tdep_uc_addr (unw_tdep_context_t *uc, int reg)
69
70 # endif /* UNW_LOCAL_ONLY */
71
72-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
73-
74-/* XXX fix me: there is currently no way to locate the dyn-info list
75- by a remote unwinder. On ia64, this is done via a special
76- unwind-table entry. Perhaps something similar can be done with
77- DWARF2 unwind info. */
78-
79 static int
80 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
81 void *arg)
82 {
83- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
84+#ifndef UNW_LOCAL_ONLY
85+# pragma weak _U_dyn_info_list_addr
86+ if (!_U_dyn_info_list_addr)
87+ return -UNW_ENOINFO;
88+#endif
89+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
90+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
91 return 0;
92 }
93
94diff --git a/src/coredump/_UPT_get_dyn_info_list_addr.c b/src/coredump/_UPT_get_dyn_info_list_addr.c
95index 0d11905..739ed05 100644
96--- a/src/coredump/_UPT_get_dyn_info_list_addr.c
97+++ b/src/coredump/_UPT_get_dyn_info_list_addr.c
98@@ -74,6 +74,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
99
100 #else
101
102+/* XXX fix me: there is currently no way to locate the dyn-info list
103+ by a remote unwinder. On ia64, this is done via a special
104+ unwind-table entry. Perhaps something similar can be done with
105+ DWARF2 unwind info. */
106+
107 static inline int
108 get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
109 int *countp)
110diff --git a/src/hppa/Ginit.c b/src/hppa/Ginit.c
111index 461e4b9..265455a 100644
112--- a/src/hppa/Ginit.c
113+++ b/src/hppa/Ginit.c
114@@ -64,13 +64,6 @@ _Uhppa_uc_addr (ucontext_t *uc, int reg)
115
116 # endif /* UNW_LOCAL_ONLY */
117
118-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
119-
120-/* XXX fix me: there is currently no way to locate the dyn-info list
121- by a remote unwinder. On ia64, this is done via a special
122- unwind-table entry. Perhaps something similar can be done with
123- DWARF2 unwind info. */
124-
125 static void
126 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
127 {
128@@ -81,7 +74,13 @@ static int
129 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
130 void *arg)
131 {
132- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
133+#ifndef UNW_LOCAL_ONLY
134+# pragma weak _U_dyn_info_list_addr
135+ if (!_U_dyn_info_list_addr)
136+ return -UNW_ENOINFO;
137+#endif
138+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
139+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
140 return 0;
141 }
142
143diff --git a/src/ia64/Ginit.c b/src/ia64/Ginit.c
144index b09a2ad..8601bb3 100644
145--- a/src/ia64/Ginit.c
146+++ b/src/ia64/Ginit.c
147@@ -68,6 +68,7 @@ get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
148 if (!_U_dyn_info_list_addr)
149 return -UNW_ENOINFO;
150 #endif
151+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
152 *dyn_info_list_addr = _U_dyn_info_list_addr ();
153 return 0;
154 }
155diff --git a/src/mi/Gfind_dynamic_proc_info.c b/src/mi/Gfind_dynamic_proc_info.c
156index 98d3501..2e7c62e 100644
157--- a/src/mi/Gfind_dynamic_proc_info.c
158+++ b/src/mi/Gfind_dynamic_proc_info.c
159@@ -49,6 +49,7 @@ local_find_proc_info (unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
160 return -UNW_ENOINFO;
161 #endif
162
163+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
164 list = (unw_dyn_info_list_t *) (uintptr_t) _U_dyn_info_list_addr ();
165 for (di = list->first; di; di = di->next)
166 if (ip >= di->start_ip && ip < di->end_ip)
167diff --git a/src/mips/Ginit.c b/src/mips/Ginit.c
168index 3df170c..bf7a8f5 100644
169--- a/src/mips/Ginit.c
170+++ b/src/mips/Ginit.c
171@@ -69,13 +69,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
172
173 # endif /* UNW_LOCAL_ONLY */
174
175-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
176-
177-/* XXX fix me: there is currently no way to locate the dyn-info list
178- by a remote unwinder. On ia64, this is done via a special
179- unwind-table entry. Perhaps something similar can be done with
180- DWARF2 unwind info. */
181-
182 static void
183 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
184 {
185@@ -86,7 +79,13 @@ static int
186 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
187 void *arg)
188 {
189- *dyn_info_list_addr = (unw_word_t) (intptr_t) &_U_dyn_info_list;
190+#ifndef UNW_LOCAL_ONLY
191+# pragma weak _U_dyn_info_list_addr
192+ if (!_U_dyn_info_list_addr)
193+ return -UNW_ENOINFO;
194+#endif
195+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
196+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
197 return 0;
198 }
199
200diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c
201index c5312d9..f8d6886 100644
202--- a/src/ppc32/Ginit.c
203+++ b/src/ppc32/Ginit.c
204@@ -91,9 +91,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
205
206 # endif /* UNW_LOCAL_ONLY */
207
208-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
209-
210-
211 static void
212 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
213 {
214@@ -104,7 +101,13 @@ static int
215 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
216 void *arg)
217 {
218- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
219+#ifndef UNW_LOCAL_ONLY
220+# pragma weak _U_dyn_info_list_addr
221+ if (!_U_dyn_info_list_addr)
222+ return -UNW_ENOINFO;
223+#endif
224+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
225+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
226 return 0;
227 }
228
229diff --git a/src/ppc64/Ginit.c b/src/ppc64/Ginit.c
230index 4c88cd6..7bfb395 100644
231--- a/src/ppc64/Ginit.c
232+++ b/src/ppc64/Ginit.c
233@@ -95,9 +95,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
234
235 # endif /* UNW_LOCAL_ONLY */
236
237-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
238-
239-
240 static void
241 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
242 {
243@@ -108,7 +105,13 @@ static int
244 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
245 void *arg)
246 {
247- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
248+#ifndef UNW_LOCAL_ONLY
249+# pragma weak _U_dyn_info_list_addr
250+ if (!_U_dyn_info_list_addr)
251+ return -UNW_ENOINFO;
252+#endif
253+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
254+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
255 return 0;
256 }
257
258diff --git a/src/ptrace/_UPT_get_dyn_info_list_addr.c b/src/ptrace/_UPT_get_dyn_info_list_addr.c
259index cc5ed04..16671d4 100644
260--- a/src/ptrace/_UPT_get_dyn_info_list_addr.c
261+++ b/src/ptrace/_UPT_get_dyn_info_list_addr.c
262@@ -71,6 +71,11 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
263
264 #else
265
266+/* XXX fix me: there is currently no way to locate the dyn-info list
267+ by a remote unwinder. On ia64, this is done via a special
268+ unwind-table entry. Perhaps something similar can be done with
269+ DWARF2 unwind info. */
270+
271 static inline int
272 get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
273 int *countp)
274diff --git a/src/s390x/Ginit.c b/src/s390x/Ginit.c
275index f0886ac..db01743 100644
276--- a/src/s390x/Ginit.c
277+++ b/src/s390x/Ginit.c
278@@ -50,8 +50,6 @@ static struct unw_addr_space local_addr_space;
279
280 unw_addr_space_t unw_local_addr_space = &local_addr_space;
281
282-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
283-
284 static inline void *
285 uc_addr (ucontext_t *uc, int reg)
286 {
287@@ -75,11 +73,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
288
289 # endif /* UNW_LOCAL_ONLY */
290
291-/* XXX fix me: there is currently no way to locate the dyn-info list
292- by a remote unwinder. On ia64, this is done via a special
293- unwind-table entry. Perhaps something similar can be done with
294- DWARF2 unwind info. */
295-
296 static void
297 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
298 {
299@@ -90,7 +83,13 @@ static int
300 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
301 void *arg)
302 {
303- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
304+#ifndef UNW_LOCAL_ONLY
305+# pragma weak _U_dyn_info_list_addr
306+ if (!_U_dyn_info_list_addr)
307+ return -UNW_ENOINFO;
308+#endif
309+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
310+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
311 return 0;
312 }
313
314diff --git a/src/sh/Ginit.c b/src/sh/Ginit.c
315index 52988a7..9fe96d2 100644
316--- a/src/sh/Ginit.c
317+++ b/src/sh/Ginit.c
318@@ -58,13 +58,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
319
320 # endif /* UNW_LOCAL_ONLY */
321
322-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
323-
324-/* XXX fix me: there is currently no way to locate the dyn-info list
325- by a remote unwinder. On ia64, this is done via a special
326- unwind-table entry. Perhaps something similar can be done with
327- DWARF2 unwind info. */
328-
329 static void
330 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
331 {
332@@ -75,7 +68,13 @@ static int
333 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
334 void *arg)
335 {
336- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
337+#ifndef UNW_LOCAL_ONLY
338+# pragma weak _U_dyn_info_list_addr
339+ if (!_U_dyn_info_list_addr)
340+ return -UNW_ENOINFO;
341+#endif
342+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
343+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
344 return 0;
345 }
346
347diff --git a/src/tilegx/Ginit.c b/src/tilegx/Ginit.c
348index 7564a55..925e641 100644
349--- a/src/tilegx/Ginit.c
350+++ b/src/tilegx/Ginit.c
351@@ -64,13 +64,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
352
353 # endif /* UNW_LOCAL_ONLY */
354
355-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
356-
357-/* XXX fix me: there is currently no way to locate the dyn-info list
358- by a remote unwinder. On ia64, this is done via a special
359- unwind-table entry. Perhaps something similar can be done with
360- DWARF2 unwind info. */
361-
362 static void
363 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
364 {
365@@ -81,7 +74,13 @@ static int
366 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
367 void *arg)
368 {
369- *dyn_info_list_addr = (unw_word_t) (intptr_t) &_U_dyn_info_list;
370+#ifndef UNW_LOCAL_ONLY
371+# pragma weak _U_dyn_info_list_addr
372+ if (!_U_dyn_info_list_addr)
373+ return -UNW_ENOINFO;
374+#endif
375+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
376+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
377 return 0;
378 }
379
380diff --git a/src/x86/Ginit.c b/src/x86/Ginit.c
381index f6b8dc2..3cec74a 100644
382--- a/src/x86/Ginit.c
383+++ b/src/x86/Ginit.c
384@@ -54,13 +54,6 @@ tdep_uc_addr (ucontext_t *uc, int reg)
385
386 # endif /* UNW_LOCAL_ONLY */
387
388-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
389-
390-/* XXX fix me: there is currently no way to locate the dyn-info list
391- by a remote unwinder. On ia64, this is done via a special
392- unwind-table entry. Perhaps something similar can be done with
393- DWARF2 unwind info. */
394-
395 static void
396 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
397 {
398@@ -71,7 +64,13 @@ static int
399 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
400 void *arg)
401 {
402- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
403+#ifndef UNW_LOCAL_ONLY
404+# pragma weak _U_dyn_info_list_addr
405+ if (!_U_dyn_info_list_addr)
406+ return -UNW_ENOINFO;
407+#endif
408+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
409+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
410 return 0;
411 }
412
413diff --git a/src/x86_64/Ginit.c b/src/x86_64/Ginit.c
414index 6161da6..5c4e426 100644
415--- a/src/x86_64/Ginit.c
416+++ b/src/x86_64/Ginit.c
417@@ -49,13 +49,6 @@ static struct unw_addr_space local_addr_space;
418
419 unw_addr_space_t unw_local_addr_space = &local_addr_space;
420
421-HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
422-
423-/* XXX fix me: there is currently no way to locate the dyn-info list
424- by a remote unwinder. On ia64, this is done via a special
425- unwind-table entry. Perhaps something similar can be done with
426- DWARF2 unwind info. */
427-
428 static void
429 put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
430 {
431@@ -66,7 +59,13 @@ static int
432 get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
433 void *arg)
434 {
435- *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
436+#ifndef UNW_LOCAL_ONLY
437+# pragma weak _U_dyn_info_list_addr
438+ if (!_U_dyn_info_list_addr)
439+ return -UNW_ENOINFO;
440+#endif
441+ // Access the `_U_dyn_info_list` from `LOCAL_ONLY` library, i.e. libunwind.so.
442+ *dyn_info_list_addr = _U_dyn_info_list_addr ();
443 return 0;
444 }
445
446--
4472.28.0
448
diff --git a/meta/recipes-support/libunwind/libunwind/0002-backtrace-Use-only-with-glibc-and-uclibc.patch b/meta/recipes-support/libunwind/libunwind/0002-backtrace-Use-only-with-glibc-and-uclibc.patch
deleted file mode 100644
index 1b862dccb1..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0002-backtrace-Use-only-with-glibc-and-uclibc.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From b61446add7ae1c041266c2fa5ba2f51cb3b65d35 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Dec 2015 06:44:07 +0000
4Subject: [PATCH 2/6] backtrace: Use only with glibc and uclibc
5
6backtrace API is glibc specific not linux specific
7so make it behave so.
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 tests/test-coredump-unwind.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
17index 5349823..3b153cb 100644
18--- a/tests/test-coredump-unwind.c
19+++ b/tests/test-coredump-unwind.c
20@@ -57,7 +57,9 @@
21 #include <grp.h>
22
23 /* For SIGSEGV handler code */
24+#ifdef __GLIBC__
25 #include <execinfo.h>
26+#endif
27 #include <sys/ucontext.h>
28
29 #include <libunwind-coredump.h>
30@@ -238,11 +240,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
31 ip);
32
33 {
34+#ifdef __GLIBC__
35 /* glibc extension */
36 void *array[50];
37 int size;
38 size = backtrace(array, 50);
39-#ifdef __linux__
40 backtrace_symbols_fd(array, size, 2);
41 #endif
42 }
43--
442.20.1
45
diff --git a/meta/recipes-support/libunwind/libunwind/sigset_t.patch b/meta/recipes-support/libunwind/libunwind/sigset_t.patch
deleted file mode 100644
index 6baaa77db5..0000000000
--- a/meta/recipes-support/libunwind/libunwind/sigset_t.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 5df1555828add4e256cb4bba49fffffc22127c34 Mon Sep 17 00:00:00 2001
2From: Dave Watson <dade.watson@gmail.com>
3Date: Wed, 27 May 2020 08:21:04 -0700
4Subject: [PATCH] aarch64: Fix __sigset build issue on muslC
5
6Described in issue #176. Taken from Alpine Linux project.
7
8Change __sigset_t to sigset_t
9
10Upstream-Status: Backport [https://github.com/libunwind/libunwind/commit/5df1555828]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 include/libunwind-aarch64.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/include/libunwind-aarch64.h b/include/libunwind-aarch64.h
17index db01a9f69..d1bd8708f 100644
18--- a/include/libunwind-aarch64.h
19+++ b/include/libunwind-aarch64.h
20@@ -202,7 +202,7 @@ typedef struct
21 unsigned long uc_flags;
22 struct ucontext *uc_link;
23 stack_t uc_stack;
24- __sigset_t uc_sigmask;
25+ sigset_t uc_sigmask;
26 struct unw_sigcontext uc_mcontext;
27 } unw_tdep_context_t;
28
diff --git a/meta/recipes-support/libunwind/libunwind_1.4.0.bb b/meta/recipes-support/libunwind/libunwind_1.5.0.bb
index 2193bd8315..089c4064f4 100644
--- a/meta/recipes-support/libunwind/libunwind_1.4.0.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.5.0.bb
@@ -2,18 +2,15 @@ require libunwind.inc
2 2
3SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \ 3SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
4 file://0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \ 4 file://0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
5 file://0002-backtrace-Use-only-with-glibc-and-uclibc.patch \
6 file://0003-x86-Stub-out-x86_local_resume.patch \ 5 file://0003-x86-Stub-out-x86_local_resume.patch \
7 file://0004-Fix-build-on-mips-musl.patch \ 6 file://0004-Fix-build-on-mips-musl.patch \
8 file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \ 7 file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
9 file://0006-Fix-for-X32.patch \ 8 file://0006-Fix-for-X32.patch \
10 file://sigset_t.patch \
11 file://0001-Fix-compilation-with-fno-common.patch \
12 " 9 "
13SRC_URI_append_libc-musl = " file://musl-header-conflict.patch" 10SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
14 11
15SRC_URI[md5sum] = "5114504c74ac3992ac06aa551cd55678" 12SRC_URI[md5sum] = "c6923dda0675f6a4ef21426164dc8b6a"
16SRC_URI[sha256sum] = "df59c931bd4d7ebfd83ee481c943edf015138089b8e50abed8d9c57ba9338435" 13SRC_URI[sha256sum] = "90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017"
17 14
18EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests --enable-static" 15EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests --enable-static"
19 16