View | Details | Raw Unified | Return to bug 229057
Collapse All | Expand All

(-)i/devel/libunwind/Makefile (-1 / +1 lines)
Lines 18-24 OPTIONS_SUB= yes Link Here
18
DOCS_CONFIGURE_ON=	ac_cv_path_LATEX2MAN=${TRUE}
18
DOCS_CONFIGURE_ON=	ac_cv_path_LATEX2MAN=${TRUE}
19
DOCS_CONFIGURE_OFF=	--disable-documentation
19
DOCS_CONFIGURE_OFF=	--disable-documentation
20
20
21
ONLY_FOR_ARCHS=	i386 amd64
21
ONLY_FOR_ARCHS=	i386 amd64 aarch64
22
22
23
GNU_CONFIGURE=	yes
23
GNU_CONFIGURE=	yes
24
INSTALL_TARGET=	install-strip
24
INSTALL_TARGET=	install-strip
(-)i/devel/libunwind/files/patch-include_libunwind-aarch64.h (+11 lines)
Added Link Here
1
--- include/libunwind-aarch64.h.orig	2018-06-15 23:58:09 UTC
2
+++ include/libunwind-aarch64.h
3
@@ -177,7 +177,7 @@ typedef ucontext_t unw_tdep_context_t;
4
 
5
 #define unw_tdep_getcontext(uc) (({					\
6
   unw_tdep_context_t *unw_ctx = (uc);					\
7
-  register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs;		\
8
+  register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.mc_gpregs.gp_x;		\
9
   __asm__ __volatile__ (						\
10
      "stp x0, x1, [%[base], #0]\n" \
11
      "stp x2, x3, [%[base], #16]\n" \
(-)i/devel/libunwind/files/patch-include_libunwind__i.h (+14 lines)
Added Link Here
1
--- include/libunwind_i.h.orig	2018-06-15 23:58:15 UTC
2
+++ include/libunwind_i.h
3
@@ -86,6 +86,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
4
 #   error Host has unknown byte-order.
5
 # endif
6
 #endif
7
+#ifdef __FreeBSD__
8
+#define __BYTE_ORDER BYTE_ORDER
9
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
10
+#define __BIG_ENDIAN BIG_ENDIAN
11
+#endif
12
 
13
 #if defined(HAVE__BUILTIN_UNREACHABLE)
14
 # define unreachable() __builtin_unreachable()
(-)i/devel/libunwind/files/patch-src_aarch64_Ginit.c (+11 lines)
Added Link Here
1
--- src/aarch64/Ginit.c.orig	2018-06-15 23:58:20 UTC
2
+++ src/aarch64/Ginit.c
3
@@ -44,7 +44,7 @@ static inline void *
4
 uc_addr (ucontext_t *uc, int reg)
5
 {
6
   if (reg >= UNW_AARCH64_X0 && reg <= UNW_AARCH64_V31)
7
-    return &uc->uc_mcontext.regs[reg];
8
+    return &uc->uc_mcontext.mc_gpregs.gp_x[reg];
9
   else
10
     return NULL;
11
 }
(-)i/devel/libunwind/files/patch-src_coredump___UCD__access__reg__freebsd.c (+13 lines)
Added Link Here
1
--- src/coredump/_UCD_access_reg_freebsd.c.orig	2018-06-16 00:05:10 UTC
2
+++ src/coredump/_UCD_access_reg_freebsd.c
3
@@ -110,6 +110,10 @@ _UCD_access_reg (unw_addr_space_t as,
4
       Debug(0, "bad regnum:%d\n", regnum);
5
       return -UNW_EINVAL;
6
   };
7
+#elif defined(UNW_TARGET_AARCH64)
8
+  if (regnum < 0 || regnum >= UNW_AARCH64_FPCR)
9
+    return -UNW_EINVAL;
10
+  *valp = ui->prstatus->pr_reg.x[regnum];
11
 #else
12
 #error Port me
13
 #endif
(-)i/devel/libunwind/files/patch-src_ptrace___UPT__access__fpreg.c (+20 lines)
Added Link Here
1
--- src/ptrace/_UPT_access_fpreg.c.orig	2018-06-15 23:58:03 UTC
2
+++ src/ptrace/_UPT_access_fpreg.c
3
@@ -85,6 +85,8 @@ _UPT_access_fpreg (unw_addr_space_t as, unw_regnum_t r
4
           memcpy(&fpreg.fpr_xacc[reg], val, sizeof(unw_fpreg_t));
5
 #elif defined(__i386__)
6
           memcpy(&fpreg.fpr_acc[reg], val, sizeof(unw_fpreg_t));
7
+#elif defined(__aarch64__)
8
+          memcpy(&fpreg.fp_q[reg], val, sizeof(unw_fpreg_t));
9
 #else
10
 #error Fix me
11
 #endif
12
@@ -95,6 +97,8 @@ _UPT_access_fpreg (unw_addr_space_t as, unw_regnum_t r
13
           memcpy(val, &fpreg.fpr_xacc[reg], sizeof(unw_fpreg_t));
14
 #elif defined(__i386__)
15
           memcpy(val, &fpreg.fpr_acc[reg], sizeof(unw_fpreg_t));
16
+#elif defined(__aarch64__)
17
+          memcpy(val, &fpreg.fp_q[reg], sizeof(unw_fpreg_t));
18
 #else
19
 #error Fix me
20
 #endif

Return to bug 229057