summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-02 21:43:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:28 +0000
commit245885063e6b2aa1c66d32458217546892768894 (patch)
tree5ae8a6a0968d7adbbe5f4110978d359da2fd5554 /meta
parentabdfacb997dd26c7bd0877738db72c695ec785bc (diff)
downloadpoky-245885063e6b2aa1c66d32458217546892768894.tar.gz
libunwind: backtrace APIs are glibc specific
Make backtrace() API's use conditional on glibc this helps make libunwind compile on musl (From OE-Core rev: acffe22de65fad2f69c702e4fe94b366883a265b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch45
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.1.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch b/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
new file mode 100644
index 0000000000..9aed419a12
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
@@ -0,0 +1,45 @@
1From 04437142399662b576bd55a85485c6dcc14d0812 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] backtrace: Use only with glibc and uclibc
5
6backtrace API is glibc specific not linux specific
7so make it behave so.
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
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 5254708..8767b42 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.6.4
45
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb
index aa62bcc662..7df9f5ee05 100644
--- a/meta/recipes-support/libunwind/libunwind_1.1.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.1.bb
@@ -7,6 +7,7 @@ SRC_URI += "\
7 file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \ 7 file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
8 file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \ 8 file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \
9 file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \ 9 file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
10 file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
10" 11"
11 12
12SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" 13SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"