From fadf415c067f6ac5661067af577668a1879f0fd8 Mon Sep 17 00:00:00 2001 From: Gnimuc Date: Fri, 5 Jul 2019 09:49:50 +0800 Subject: [PATCH] Try to fix `__gxx_personality_v0` related issues For now, it just returns `_URC_HANDLER_FOUND`. For better exception handling, we need to implement this carefully. --- src/boot.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/boot.h b/src/boot.h index 153412d0..5169d2f8 100644 --- a/src/boot.h +++ b/src/boot.h @@ -15,6 +15,7 @@ extern "C" { #include #include #include +#include // More workarounds for old libstdc++ #if defined(__GLIBCXX__) && !defined(__cpp_lib_is_final) @@ -36,6 +37,11 @@ extern "C" { #ifdef _WIN32 void __cxa_atexit() {} + _Unwind_Reason_Code __gxx_personality_v0( + int version, _Unwind_Action actions, uint64_t exceptionClass, + _Unwind_Exception* unwind_exception, _Unwind_Context* context) { + return _URC_HANDLER_FOUND; + } #endif } void __hack() {