diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-03-23 06:51:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-28 15:55:50 +0100 |
commit | 856be1f45a18a941c4e4729987e7be353fcbe7f7 (patch) | |
tree | faafdf42e3ac4da0c27e7b5aacae19eafab08093 /meta/recipes-support | |
parent | dd61341ff15b96dd7471fe8b0dc9575cb62d5f30 (diff) | |
download | poky-856be1f45a18a941c4e4729987e7be353fcbe7f7.tar.gz |
libunwind: Fix build on mips/mips64 for musl targets
(From OE-Core rev: c1847278dbfc3424790f7256be2b35bcdbaaf018)
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-Fix-build-on-mips-musl.patch | 90 | ||||
-rw-r--r-- | meta/recipes-support/libunwind/libunwind_1.1.bb | 1 |
2 files changed, 91 insertions, 0 deletions
diff --git a/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch b/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch new file mode 100644 index 0000000000..5426fcc5c1 --- /dev/null +++ b/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch | |||
@@ -0,0 +1,90 @@ | |||
1 | From e623c7703945a5eb6c9a30586ec5e23b2f7396f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 23 Mar 2016 06:08:59 +0000 | ||
4 | Subject: [PATCH] Fix build on mips/musl | ||
5 | |||
6 | Do not include endian.h on musl it includes | ||
7 | further headers which can not be compiled in __ASSEMBLER__ | ||
8 | mode | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | Upstream-Status: Pending | ||
13 | |||
14 | src/coredump/_UCD_internal.h | 34 ++++++++++++++++++++++++++++++++++ | ||
15 | src/mips/getcontext.S | 3 +-- | ||
16 | 2 files changed, 35 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h | ||
19 | index 3c95a2a..80acc15 100644 | ||
20 | --- a/src/coredump/_UCD_internal.h | ||
21 | +++ b/src/coredump/_UCD_internal.h | ||
22 | @@ -34,6 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
23 | #ifdef HAVE_SYS_PROCFS_H | ||
24 | #include <sys/procfs.h> /* struct elf_prstatus */ | ||
25 | #endif | ||
26 | +#include <sys/reg.h> | ||
27 | #include <errno.h> | ||
28 | #include <string.h> | ||
29 | #include <limits.h> | ||
30 | @@ -44,6 +45,39 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
31 | |||
32 | #include "libunwind_i.h" | ||
33 | |||
34 | +#ifndef __GLIBC__ | ||
35 | +#define EF_REG0 6 | ||
36 | +#define EF_REG1 7 | ||
37 | +#define EF_REG2 8 | ||
38 | +#define EF_REG3 9 | ||
39 | +#define EF_REG4 10 | ||
40 | +#define EF_REG5 11 | ||
41 | +#define EF_REG6 12 | ||
42 | +#define EF_REG7 13 | ||
43 | +#define EF_REG8 14 | ||
44 | +#define EF_REG9 15 | ||
45 | +#define EF_REG10 16 | ||
46 | +#define EF_REG11 17 | ||
47 | +#define EF_REG12 18 | ||
48 | +#define EF_REG13 19 | ||
49 | +#define EF_REG14 20 | ||
50 | +#define EF_REG15 21 | ||
51 | +#define EF_REG16 22 | ||
52 | +#define EF_REG17 23 | ||
53 | +#define EF_REG18 24 | ||
54 | +#define EF_REG19 25 | ||
55 | +#define EF_REG20 26 | ||
56 | +#define EF_REG21 27 | ||
57 | +#define EF_REG22 28 | ||
58 | +#define EF_REG23 29 | ||
59 | +#define EF_REG24 30 | ||
60 | +#define EF_REG25 31 | ||
61 | +#define EF_REG28 34 | ||
62 | +#define EF_REG29 35 | ||
63 | +#define EF_REG30 36 | ||
64 | +#define EF_REG31 37 | ||
65 | +#endif | ||
66 | + | ||
67 | |||
68 | #if SIZEOF_OFF_T == 4 | ||
69 | typedef uint32_t uoff_t; | ||
70 | diff --git a/src/mips/getcontext.S b/src/mips/getcontext.S | ||
71 | index d1dbd57..de9b681 100644 | ||
72 | --- a/src/mips/getcontext.S | ||
73 | +++ b/src/mips/getcontext.S | ||
74 | @@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
75 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | ||
76 | |||
77 | #include "offsets.h" | ||
78 | -#include <endian.h> | ||
79 | |||
80 | .text | ||
81 | |||
82 | #if _MIPS_SIM == _ABIO32 | ||
83 | -# if __BYTE_ORDER == __BIG_ENDIAN | ||
84 | +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ | ||
85 | # define OFFSET 4 | ||
86 | # else | ||
87 | # define OFFSET 0 | ||
88 | -- | ||
89 | 1.8.3.1 | ||
90 | |||
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb index 1ed525f515..aff84092a6 100644 --- a/meta/recipes-support/libunwind/libunwind_1.1.bb +++ b/meta/recipes-support/libunwind/libunwind_1.1.bb | |||
@@ -12,6 +12,7 @@ SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | |||
12 | SRC_URI_append_libc-musl = "\ | 12 | SRC_URI_append_libc-musl = "\ |
13 | file://0001-x86-Stub-out-x86_local_resume.patch \ | 13 | file://0001-x86-Stub-out-x86_local_resume.patch \ |
14 | file://0001-disable-tests.patch \ | 14 | file://0001-disable-tests.patch \ |
15 | file://0001-Fix-build-on-mips-musl.patch \ | ||
15 | " | 16 | " |
16 | SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" | 17 | SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" |
17 | SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a" | 18 | SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a" |