b14609dc629f55348af2d49996eb601c86629c8f
[openwrt/staging/jow.git] / package / libs / libcxxabi / patches / 010-arm.patch
1 --- a/src/cxa_exception.h
2 +++ b/src/cxa_exception.h
3 @@ -27,6 +27,13 @@ _LIBCXXABI_HIDDEN uint64_t __getExceptio
4 _LIBCXXABI_HIDDEN void __setExceptionClass ( _Unwind_Exception*, uint64_t);
5 _LIBCXXABI_HIDDEN bool __isOurExceptionClass(const _Unwind_Exception*);
6
7 +#if defined(__arm__) && defined(__GNUC__)
8 +// missing values from _Unwind_Reason_Code enum
9 +#define _URC_FATAL_PHASE2_ERROR ((_Unwind_Reason_Code)2)
10 +#define _URC_FATAL_PHASE1_ERROR ((_Unwind_Reason_Code)3)
11 +#define _URC_NORMAL_STOP ((_Unwind_Reason_Code)4)
12 +#endif
13 +
14 struct _LIBCXXABI_HIDDEN __cxa_exception {
15 #if defined(__LP64__) || defined(_WIN64) || defined(_LIBCXXABI_ARM_EHABI)
16 // Now _Unwind_Exception is marked with __attribute__((aligned)),
17 --- a/src/cxa_personality.cpp
18 +++ b/src/cxa_personality.cpp
19 @@ -1108,7 +1108,7 @@ __gxx_personality_v0(_Unwind_State state
20
21 // Check the undocumented force unwinding behavior
22 bool is_force_unwinding = state & _US_FORCE_UNWIND;
23 - state &= ~_US_FORCE_UNWIND;
24 + state = (_Unwind_State)(state & ~_US_FORCE_UNWIND);
25
26 scan_results results;
27 switch (state) {