aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libunwind/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/libs/libunwind/patches')
-rw-r--r--package/libs/libunwind/patches/001-disable-tests.patch22
-rw-r--r--package/libs/libunwind/patches/002-fix-building-getcontext_S.patch19
-rw-r--r--package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch47
3 files changed, 88 insertions, 0 deletions
diff --git a/package/libs/libunwind/patches/001-disable-tests.patch b/package/libs/libunwind/patches/001-disable-tests.patch
new file mode 100644
index 0000000000..9700fea477
--- /dev/null
+++ b/package/libs/libunwind/patches/001-disable-tests.patch
@@ -0,0 +1,22 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -36,7 +36,7 @@
+
+ nodist_include_HEADERS = include/libunwind-common.h
+
+-SUBDIRS = src tests doc
++SUBDIRS = src doc
+
+ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
+ include/compiler.h include/libunwind_i.h include/mempool.h \
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -313,7 +313,7 @@
+ $(am__append_7) $(am__append_8) $(am__append_9) \
+ $(am__append_10)
+ nodist_include_HEADERS = include/libunwind-common.h
+-SUBDIRS = src tests doc
++SUBDIRS = src doc
+ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
+ include/compiler.h include/libunwind_i.h include/mempool.h \
+ include/remote.h \
diff --git a/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch b/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch
new file mode 100644
index 0000000000..10b1dd1d90
--- /dev/null
+++ b/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch
@@ -0,0 +1,19 @@
+diff -uprN a/src/mips/getcontext.S b/src/mips/getcontext.S
+--- a/src/mips/getcontext.S 2012-10-06 12:54:38.000000000 +0800
++++ b/src/mips/getcontext.S 2016-06-08 13:35:25.033051679 +0800
+@@ -24,12 +24,12 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+ #include "offsets.h"
+-#include <endian.h>
+
+ .text
++ .set nomips16
+
+ #if _MIPS_SIM == _ABIO32
+-# if __BYTE_ORDER == __BIG_ENDIAN
++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ # define OFFSET 4
+ # else
+ # define OFFSET 0
+
diff --git a/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch b/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch
new file mode 100644
index 0000000000..465abb4ce0
--- /dev/null
+++ b/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch
@@ -0,0 +1,47 @@
+diff -uprN a/include/libunwind-mips.h b/include/libunwind-mips.h
+--- a/include/libunwind-mips.h 2012-10-06 12:54:38.000000000 +0800
++++ b/include/libunwind-mips.h 2016-06-08 13:55:55.029436442 +0800
+@@ -111,6 +111,42 @@ typedef enum
+ }
+ mips_regnum_t;
+
++#ifndef __GLIBC__
++#include <sys/reg.h>
++
++/* musl as of 1.1.14 does not export these */
++#define EF_REG0 6
++#define EF_REG1 7
++#define EF_REG2 8
++#define EF_REG3 9
++#define EF_REG4 10
++#define EF_REG5 11
++#define EF_REG6 12
++#define EF_REG7 13
++#define EF_REG8 14
++#define EF_REG9 15
++#define EF_REG10 16
++#define EF_REG11 17
++#define EF_REG12 18
++#define EF_REG13 19
++#define EF_REG14 20
++#define EF_REG15 21
++#define EF_REG16 22
++#define EF_REG17 23
++#define EF_REG18 24
++#define EF_REG19 25
++#define EF_REG20 26
++#define EF_REG21 27
++#define EF_REG22 28
++#define EF_REG23 29
++#define EF_REG24 30
++#define EF_REG25 31
++#define EF_REG28 34
++#define EF_REG29 35
++#define EF_REG30 36
++#define EF_REG31 37
++#endif
++
+ typedef enum
+ {
+ UNW_MIPS_ABI_O32,
+