diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-01-02 21:43:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-24 09:40:28 +0000 |
commit | 245885063e6b2aa1c66d32458217546892768894 (patch) | |
tree | 5ae8a6a0968d7adbbe5f4110978d359da2fd5554 /meta/recipes-support | |
parent | abdfacb997dd26c7bd0877738db72c695ec785bc (diff) | |
download | poky-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/recipes-support')
-rw-r--r-- | meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch | 45 | ||||
-rw-r--r-- | meta/recipes-support/libunwind/libunwind_1.1.bb | 1 |
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 @@ | |||
1 | From 04437142399662b576bd55a85485c6dcc14d0812 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 31 Dec 2015 06:44:07 +0000 | ||
4 | Subject: [PATCH] backtrace: Use only with glibc and uclibc | ||
5 | |||
6 | backtrace API is glibc specific not linux specific | ||
7 | so make it behave so. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Pending | ||
12 | |||
13 | tests/test-coredump-unwind.c | 4 +++- | ||
14 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c | ||
17 | index 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 | -- | ||
44 | 2.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 | ||
12 | SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" | 13 | SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" |