Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 May 2017 20:34:23 +0000 (UTC)
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r441426 - in head/lang: gcc5/files gcc6/files
Message-ID:  <201705212034.v4LKYNd6001888@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andreast (src committer)
Date: Sun May 21 20:34:22 2017
New Revision: 441426
URL: https://svnweb.freebsd.org/changeset/ports/441426

Log:
  Make _Unwind_GetIP, _Unwind_GetIPInfo and _Unwind_SetIP available as functions
  for arm*-*-freebsd*.
  This patch is already pushed upstream to all active gcc branches.
  GCC-5, GCC-6, GCC-7 and trunk. The gcc?-devel ports will catch up these bits
  with the next update.
  Once a new release for gcc6 or gcc5 is done, this patch will be obsolete.
  
  Approved by: gerald@ (maintainer)

Added:
  head/lang/gcc5/files/patch-libgcc-config-arm-unwind-arm   (contents, props changed)
  head/lang/gcc6/files/patch-libgcc-config-arm-unwind-arm   (contents, props changed)

Added: head/lang/gcc5/files/patch-libgcc-config-arm-unwind-arm
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc5/files/patch-libgcc-config-arm-unwind-arm	Sun May 21 20:34:22 2017	(r441426)
@@ -0,0 +1,51 @@
+--- UTC
+--- libgcc/config/arm/unwind-arm.h.orig	2017-05-20 23:16:46.089160000 +0200
++++ libgcc/config/arm/unwind-arm.h	2017-05-20 23:17:17.447204000 +0200
+@@ -72,12 +72,19 @@
+     {
+       return _URC_FAILURE;
+     }
++#ifndef __FreeBSD__
+   /* Return the address of the instruction, not the actual IP value.  */
+ #define _Unwind_GetIP(context) \
+   (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1)
+ 
+ #define _Unwind_SetIP(context, val) \
+   _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1))
++#else
++  #undef _Unwind_GetIPInfo
++  _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
++  _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
++  void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
++#endif
+ 
+ #ifdef __cplusplus
+ }   /* extern "C" */
+--- libgcc/config/arm/unwind-arm.c.orig	2017-05-20 23:16:46.089435000 +0200
++++ libgcc/config/arm/unwind-arm.c	2017-05-20 23:17:17.447479000 +0200
+@@ -509,3 +509,25 @@
+ {
+   return __gnu_unwind_pr_common (state, ucbp, context, 2);
+ }
++
++#ifdef __FreeBSD__
++/* FreeBSD expects these to be functions */
++inline _Unwind_Ptr
++_Unwind_GetIP (struct _Unwind_Context *context)
++{
++  return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1;
++}
++
++inline _Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++  *ip_before_insn = 0;
++  return _Unwind_GetIP (context);
++}
++
++inline void
++_Unwind_SetIP (struct _Unwind_Context *context, _Unwind_Ptr val)
++{
++  _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1));
++}
++#endif

Added: head/lang/gcc6/files/patch-libgcc-config-arm-unwind-arm
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/gcc6/files/patch-libgcc-config-arm-unwind-arm	Sun May 21 20:34:22 2017	(r441426)
@@ -0,0 +1,51 @@
+--- UTC
+--- libgcc/config/arm/unwind-arm.h.orig	2017-05-20 23:16:46.089160000 +0200
++++ libgcc/config/arm/unwind-arm.h	2017-05-20 23:17:17.447204000 +0200
+@@ -72,12 +72,19 @@
+     {
+       return _URC_FAILURE;
+     }
++#ifndef __FreeBSD__
+   /* Return the address of the instruction, not the actual IP value.  */
+ #define _Unwind_GetIP(context) \
+   (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1)
+ 
+ #define _Unwind_SetIP(context, val) \
+   _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1))
++#else
++  #undef _Unwind_GetIPInfo
++  _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
++  _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
++  void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
++#endif
+ 
+ #ifdef __cplusplus
+ }   /* extern "C" */
+--- libgcc/config/arm/unwind-arm.c.orig	2017-05-20 23:16:46.089435000 +0200
++++ libgcc/config/arm/unwind-arm.c	2017-05-20 23:17:17.447479000 +0200
+@@ -509,3 +509,25 @@
+ {
+   return __gnu_unwind_pr_common (state, ucbp, context, 2);
+ }
++
++#ifdef __FreeBSD__
++/* FreeBSD expects these to be functions */
++inline _Unwind_Ptr
++_Unwind_GetIP (struct _Unwind_Context *context)
++{
++  return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1;
++}
++
++inline _Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++  *ip_before_insn = 0;
++  return _Unwind_GetIP (context);
++}
++
++inline void
++_Unwind_SetIP (struct _Unwind_Context *context, _Unwind_Ptr val)
++{
++  _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1));
++}
++#endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705212034.v4LKYNd6001888>