diff options
author | Andreas Tobler <andreast@FreeBSD.org> | 2017-05-21 20:34:22 +0000 |
---|---|---|
committer | Andreas Tobler <andreast@FreeBSD.org> | 2017-05-21 20:34:22 +0000 |
commit | b172a04396503188c536804c512e6bf0ede04b98 (patch) | |
tree | 19d7676531967db3829c6e41ff0650e50b34a9cf /lang/gcc5 | |
parent | 38874c7e166452e364d20979c4f0b13f7f0d81aa (diff) | |
download | ports-b172a04396503188c536804c512e6bf0ede04b98.tar.gz ports-b172a04396503188c536804c512e6bf0ede04b98.zip |
Notes
Diffstat (limited to 'lang/gcc5')
-rw-r--r-- | lang/gcc5/files/patch-libgcc-config-arm-unwind-arm | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lang/gcc5/files/patch-libgcc-config-arm-unwind-arm b/lang/gcc5/files/patch-libgcc-config-arm-unwind-arm new file mode 100644 index 000000000000..d332d2bf867a --- /dev/null +++ b/lang/gcc5/files/patch-libgcc-config-arm-unwind-arm @@ -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 |