This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 93924733aec2e62c2462e2a81df22fda2326df82 Author: v-zhangxiaomeng5 <[email protected]> AuthorDate: Sat Mar 14 16:45:49 2026 +0800 libs/libxx/libcxxabi: compile cxa_noexception.cpp when exceptions are off Without CONFIG_CXX_EXCEPTION, cxa_exception.cpp is not built, so nothing provides __cxa_uncaught_exceptions(), the exception_ptr reference counting and the other entry points that libc++ and cxa_vector.cpp call. Build cxa_noexception.cpp instead, which defines them for a library without exceptions, as upstream libc++abi does. Assisted-by: Claude:claude-opus-5.5 Signed-off-by: v-zhangxiaomeng5 <[email protected]> --- libs/libxx/libcxxabi/CMakeLists.txt | 2 ++ libs/libxx/libcxxabi/Make.defs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libs/libxx/libcxxabi/CMakeLists.txt b/libs/libxx/libcxxabi/CMakeLists.txt index 62ae0a518c4..748ef060ae0 100644 --- a/libs/libxx/libcxxabi/CMakeLists.txt +++ b/libs/libxx/libcxxabi/CMakeLists.txt @@ -88,6 +88,8 @@ if(CONFIG_LIBCXXABI) if(CONFIG_CXX_EXCEPTION) list(APPEND SRCS cxa_exception.cpp cxa_exception_storage.cpp cxa_personality.cpp) + else() + list(APPEND SRCS cxa_noexception.cpp) endif() if(CONFIG_CXX_RTTI) diff --git a/libs/libxx/libcxxabi/Make.defs b/libs/libxx/libcxxabi/Make.defs index da8c4a98b02..80ca2e8be41 100644 --- a/libs/libxx/libcxxabi/Make.defs +++ b/libs/libxx/libcxxabi/Make.defs @@ -70,6 +70,8 @@ CPPSRCS += abort_message.cpp fallback_malloc.cpp ifeq ($(CONFIG_CXX_EXCEPTION),y) CPPSRCS += cxa_exception.cpp cxa_personality.cpp cxa_exception_storage.cpp +else +CPPSRCS += cxa_noexception.cpp endif ifeq ($(CONFIG_CXX_RTTI),y)
