summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-03-23 06:51:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-28 15:55:50 +0100
commit856be1f45a18a941c4e4729987e7be353fcbe7f7 (patch)
treefaafdf42e3ac4da0c27e7b5aacae19eafab08093 /meta/recipes-support
parentdd61341ff15b96dd7471fe8b0dc9575cb62d5f30 (diff)
downloadpoky-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.patch90
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.1.bb1
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 @@
1From e623c7703945a5eb6c9a30586ec5e23b2f7396f6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 23 Mar 2016 06:08:59 +0000
4Subject: [PATCH] Fix build on mips/musl
5
6Do not include endian.h on musl it includes
7further headers which can not be compiled in __ASSEMBLER__
8 mode
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-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
18diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h
19index 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;
70diff --git a/src/mips/getcontext.S b/src/mips/getcontext.S
71index 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--
891.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 \
12SRC_URI_append_libc-musl = "\ 12SRC_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"
16SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" 17SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
17SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a" 18SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"