summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2015-02-01 09:50:33 +0000
committerandrew <andrew@FreeBSD.org>2015-02-01 09:50:33 +0000
commit1a44efb220166a3c852d3f460ce55f68a6c68f29 (patch)
treeb5572c714f5b73e8b84dc67b9bd600b41b0c9929 /contrib/gcc/config
parent2a6b615dd7667a073a5923f9fa0cfc7bf0ad7f0d (diff)
downloadFreeBSD-src-1a44efb220166a3c852d3f460ce55f68a6c68f29.zip
FreeBSD-src-1a44efb220166a3c852d3f460ce55f68a6c68f29.tar.gz
FreeBSD expects _Unwind_GetGR, _Unwind_SetGR, and _Unwind_SetIP to be
symbols and not macros. Make this so. This fixes a few ports that try to link against these functions but fail as they previously didn't exist.
Diffstat (limited to 'contrib/gcc/config')
-rw-r--r--contrib/gcc/config/arm/unwind-arm.c8
-rw-r--r--contrib/gcc/config/arm/unwind-arm.h27
2 files changed, 24 insertions, 11 deletions
diff --git a/contrib/gcc/config/arm/unwind-arm.c b/contrib/gcc/config/arm/unwind-arm.c
index 47354b4..fff5fdf 100644
--- a/contrib/gcc/config/arm/unwind-arm.c
+++ b/contrib/gcc/config/arm/unwind-arm.c
@@ -25,6 +25,7 @@
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#define __ARM_STATIC_INLINE
#include "unwind.h"
/* We add a prototype for abort here to avoid creating a dependency on
@@ -1089,4 +1090,11 @@ _Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
*ip_before_insn = 0;
return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1;
}
+
+void
+_Unwind_SetIP (struct _Unwind_Context *context, _Unwind_Ptr val)
+{
+ _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1));
+}
+
#endif
diff --git a/contrib/gcc/config/arm/unwind-arm.h b/contrib/gcc/config/arm/unwind-arm.h
index ab8531d..b1f47b8 100644
--- a/contrib/gcc/config/arm/unwind-arm.h
+++ b/contrib/gcc/config/arm/unwind-arm.h
@@ -34,6 +34,10 @@
#define __ARM_EABI_UNWINDER__ 1
+#ifndef __ARM_STATIC_INLINE
+#define __ARM_STATIC_INLINE static inline
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -245,7 +249,7 @@ extern "C" {
return tmp;
}
- static inline _Unwind_Word
+ __ARM_STATIC_INLINE _Unwind_Word
_Unwind_GetGR (_Unwind_Context *context, int regno)
{
_uw val;
@@ -253,6 +257,12 @@ extern "C" {
return val;
}
+ __ARM_STATIC_INLINE void
+ _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val)
+ {
+ _Unwind_VRS_Set (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
+ }
+
#ifndef __FreeBSD__
/* Return the address of the instruction, not the actual IP value. */
#define _Unwind_GetIP(context) \
@@ -260,21 +270,16 @@ extern "C" {
#define _Unwind_GetIPInfo(context, ip_before_insn) \
(*ip_before_insn = 0, _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1)
-#else
- _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
- _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
-#endif
-
- static inline void
- _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val)
- {
- _Unwind_VRS_Set (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
- }
/* The dwarf unwinder doesn't understand arm/thumb state. We assume the
landing pad uses the same instruction set as the call site. */
#define _Unwind_SetIP(context, val) \
_Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1))
+#else
+ _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" */
OpenPOWER on IntegriCloud