From 78ed1384534b7216ea9c8972fcc3f3f051e6f7a5 Mon Sep 17 00:00:00 2001 From: Amey Inamdar Date: Tue, 21 Nov 2017 12:41:49 +0530 Subject: [PATCH] cxx_exceptions: Add missing stubs for cxx exceptions with exceptions disabled The misssing stubs get pulled in from the toolchain's libstdc++ also causing to pull in defined stubs. This results in redefinition of symbols. Fixing it by simply adding the missing stubs when exceptions are disabled. Signed-off-by: Amey Inamdar --- components/cxx/cxx_exception_stubs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/cxx/cxx_exception_stubs.cpp b/components/cxx/cxx_exception_stubs.cpp index 4c914b2b71..3f7632c6d5 100644 --- a/components/cxx/cxx_exception_stubs.cpp +++ b/components/cxx/cxx_exception_stubs.cpp @@ -74,10 +74,12 @@ void std::__throw_future_error(int) __attribute__((alias("__cxx_fatal_exception_ */ extern "C" void __cxa_allocate_exception(void) __attribute__((alias("__cxx_fatal_exception"))); +extern "C" void __cxa_allocate_dependent_exception(void) __attribute__((alias("__cxx_fatal_exception"))); extern "C" void __cxa_begin_catch(void) __attribute__((alias("__cxx_fatal_exception"))); extern "C" void __cxa_end_catch(void) __attribute__((alias("__cxx_fatal_exception"))); extern "C" void __cxa_get_exception_ptr(void) __attribute__((alias("__cxx_fatal_exception"))); extern "C" void __cxa_free_exception(void) __attribute__((alias("__cxx_fatal_exception"))); +extern "C" void __cxa_free_dependent_exception(void) __attribute__((alias("__cxx_fatal_exception"))); extern "C" void __cxa_rethrow(void) __attribute__((alias("__cxx_fatal_exception"))); extern "C" void __cxa_throw(void) __attribute__((alias("__cxx_fatal_exception"))); extern "C" void __cxa_call_terminate(void) __attribute__((alias("__cxx_fatal_exception")));