aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libcxxabi/patches
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-08-28 20:17:38 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2020-08-31 22:11:23 +0200
commit3f9bd9e8ee609b82a709fc62d42187211dd9804f (patch)
tree9090902f36f66554be403ef6c977cae907783cf6 /package/libs/libcxxabi/patches
parent21abc09cd6a106714664519283d0cb9e92ff7ef4 (diff)
downloadupstream-3f9bd9e8ee609b82a709fc62d42187211dd9804f.tar.gz
upstream-3f9bd9e8ee609b82a709fc62d42187211dd9804f.tar.bz2
upstream-3f9bd9e8ee609b82a709fc62d42187211dd9804f.zip
libcxxabi: add
This will be used for libcxx. libcxxabi is needed as libsupc++ is not good enough for libcxx. It uses GCC specific stuff which causes failed compilation for some packages. There are also runtime issues, most notably with cxxopts where the program just crashes. Reference: https://github.com/gerbera/gerbera/issues/795 Added patch to fix ARM compilation. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'package/libs/libcxxabi/patches')
-rw-r--r--package/libs/libcxxabi/patches/010-arm.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/libs/libcxxabi/patches/010-arm.patch b/package/libs/libcxxabi/patches/010-arm.patch
new file mode 100644
index 0000000000..b14609dc62
--- /dev/null
+++ b/package/libs/libcxxabi/patches/010-arm.patch
@@ -0,0 +1,27 @@
+--- a/src/cxa_exception.h
++++ b/src/cxa_exception.h
+@@ -27,6 +27,13 @@ _LIBCXXABI_HIDDEN uint64_t __getExceptio
+ _LIBCXXABI_HIDDEN void __setExceptionClass ( _Unwind_Exception*, uint64_t);
+ _LIBCXXABI_HIDDEN bool __isOurExceptionClass(const _Unwind_Exception*);
+
++#if defined(__arm__) && defined(__GNUC__)
++// missing values from _Unwind_Reason_Code enum
++#define _URC_FATAL_PHASE2_ERROR ((_Unwind_Reason_Code)2)
++#define _URC_FATAL_PHASE1_ERROR ((_Unwind_Reason_Code)3)
++#define _URC_NORMAL_STOP ((_Unwind_Reason_Code)4)
++#endif
++
+ struct _LIBCXXABI_HIDDEN __cxa_exception {
+ #if defined(__LP64__) || defined(_WIN64) || defined(_LIBCXXABI_ARM_EHABI)
+ // Now _Unwind_Exception is marked with __attribute__((aligned)),
+--- a/src/cxa_personality.cpp
++++ b/src/cxa_personality.cpp
+@@ -1108,7 +1108,7 @@ __gxx_personality_v0(_Unwind_State state
+
+ // Check the undocumented force unwinding behavior
+ bool is_force_unwinding = state & _US_FORCE_UNWIND;
+- state &= ~_US_FORCE_UNWIND;
++ state = (_Unwind_State)(state & ~_US_FORCE_UNWIND);
+
+ scan_results results;
+ switch (state) {