aboutsummaryrefslogtreecommitdiff
path: root/lib/builtins/gcc_personality_v0.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/builtins/gcc_personality_v0.c')
-rw-r--r--lib/builtins/gcc_personality_v0.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/builtins/gcc_personality_v0.c b/lib/builtins/gcc_personality_v0.c
index 29e5be30712f..0bc765624564 100644
--- a/lib/builtins/gcc_personality_v0.c
+++ b/lib/builtins/gcc_personality_v0.c
@@ -12,6 +12,17 @@
#include "int_lib.h"
#include <unwind.h>
+#if defined(__arm__) && !defined(__ARM_DWARF_EH__) && !defined(__USING_SJLJ_EXCEPTIONS__)
+/*
+ * When building with older compilers (e.g. clang <3.9), it is possible that we
+ * have a version of unwind.h which does not provide the EHABI declarations
+ * which are quired for the C personality to conform to the specification. In
+ * order to provide forward compatibility for such compilers, we re-declare the
+ * necessary interfaces in the helper to permit a standalone compilation of the
+ * builtins (which contains the C unwinding personality for historical reasons).
+ */
+#include "unwind-ehabi-helpers.h"
+#endif
/*
* Pointer encodings documented at: