libunwind: initial version 1.1

The package Makefile was based on work at link [1] with the following
changes

 1. Disable minidebuginfo support thus no dependency on liblzma
 2. Add 2 patches for building against musl-libc and building with
    mips16 enabled
 3. Add LICENSE and DEPENDS info, etc.

[1] https://github.com/rpi-openwrt/rpi-packages/tree/master/libs/libunwind

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
Yousong Zhou
2016-06-09 10:04:23 +08:00
committed by John Crispin
parent 9a4935687d
commit 987f14ab23
4 changed files with 141 additions and 0 deletions

View File

@@ -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 \

View File

@@ -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

View File

@@ -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,