summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch')
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch b/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
new file mode 100644
index 0000000000..8bcc252bad
--- /dev/null
+++ b/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
@@ -0,0 +1,81 @@
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
18Index: git/src/coredump/_UCD_internal.h
19===================================================================
20--- git.orig/src/coredump/_UCD_internal.h
21+++ git/src/coredump/_UCD_internal.h
22@@ -44,6 +44,41 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
23
24 #include "libunwind_i.h"
25
26+#ifndef __GLIBC__
27+#include <sys/reg.h>
28+
29+#define EF_REG0 6
30+#define EF_REG1 7
31+#define EF_REG2 8
32+#define EF_REG3 9
33+#define EF_REG4 10
34+#define EF_REG5 11
35+#define EF_REG6 12
36+#define EF_REG7 13
37+#define EF_REG8 14
38+#define EF_REG9 15
39+#define EF_REG10 16
40+#define EF_REG11 17
41+#define EF_REG12 18
42+#define EF_REG13 19
43+#define EF_REG14 20
44+#define EF_REG15 21
45+#define EF_REG16 22
46+#define EF_REG17 23
47+#define EF_REG18 24
48+#define EF_REG19 25
49+#define EF_REG20 26
50+#define EF_REG21 27
51+#define EF_REG22 28
52+#define EF_REG23 29
53+#define EF_REG24 30
54+#define EF_REG25 31
55+#define EF_REG28 34
56+#define EF_REG29 35
57+#define EF_REG30 36
58+#define EF_REG31 37
59+#endif
60+
61
62 #if SIZEOF_OFF_T == 4
63 typedef uint32_t uoff_t;
64Index: git/src/mips/getcontext.S
65===================================================================
66--- git.orig/src/mips/getcontext.S
67+++ git/src/mips/getcontext.S
68@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
69 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
70
71 #include "offsets.h"
72-#include <endian.h>
73
74 .text
75
76 #if _MIPS_SIM == _ABIO32
77-# if __BYTE_ORDER == __BIG_ENDIAN
78+# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
79 # define OFFSET 4
80 # else
81 # define OFFSET 0