From: Felipe Huici Date: Mon, 11 Nov 2019 13:37:06 +0000 (+0100) Subject: We add a config option to toggle the thread support. This means adding the X-Git-Tag: RELEASE-0.4~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=84107fa4;p=unikraft%2Flibs%2Flibcxxabi.git We add a config option to toggle the thread support. This means adding the source cxa_thread_atexit.cpp and not defining _LIBCXXABI_HAS_NO_THREADS. Signed-off-by: Vlad-Andrei Badoiu Reviewed-by: Felipe Huici --- diff --git a/Config.uk b/Config.uk index 9e96041..d6e1f00 100644 --- a/Config.uk +++ b/Config.uk @@ -1,4 +1,10 @@ menuconfig LIBCXXABI bool "libcxxabi - c++ abi" - select LIBUNWIND + select LIBUNWIND default n + +if LIBCXXABI + config LIBCXXABI_THREADS + bool "Enable threads support" + select CXX_THREADS +endif diff --git a/Makefile.uk b/Makefile.uk index 2c5d1a5..52e9114 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -68,7 +68,9 @@ CXXINCLUDES-$(CONFIG_LIBCXXABI) += -I$(LIBCXXABI_SRC)/include ################################################################################ # Global flags ################################################################################ +#ifndef CONFIG_LIBCXXABI_THREADS CONFIG_FLAGS += -D _LIBCXXABI_HAS_NO_THREADS +#endif LIBCXXABI_CFLAGS-y += $(CONFIG_FLAGS) LIBCXXABI_CXXFLAGS-y += $(CONFIG_FLAGS) @@ -97,3 +99,6 @@ LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/private_typeinfo.cpp LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_handlers.cpp LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_default_handlers.cpp LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_guard.cpp +#ifdef CONFIG_LIBCXXABI_THREADS +LIBCXXABI_SRCS-y += $(LIBCXXABI_SRC)/src/cxa_thread_atexit.cpp +#endif