[libcxxabi] r255559 - [libc++abi] Use libgcc and libgcc_s to provide _Unwind symbols instead of libgcc_eh.a
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 14 14:20:04 PST 2015
Author: ericwf
Date: Mon Dec 14 16:20:04 2015
New Revision: 255559
URL: http://llvm.org/viewvc/llvm-project?rev=255559&view=rev
Log:
[libc++abi] Use libgcc and libgcc_s to provide _Unwind symbols instead of libgcc_eh.a
Summary:
libgcc_eh.a cannot be used when building libc++abi as a shared library (the default configuration). See this post for some more discussion: https://gcc.gnu.org/ml/gcc/2012-03/msg00104.html
This patch reverts back to using libgcc_s when linking libc++abi.so.
Reviewers: danalbert, chandlerc, mclow.lists, ismail, compnerd
Subscribers: vkalintiris, cfe-commits
Differential Revision: http://reviews.llvm.org/D15440
Modified:
libcxxabi/trunk/cmake/config-ix.cmake
libcxxabi/trunk/src/CMakeLists.txt
Modified: libcxxabi/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/cmake/config-ix.cmake?rev=255559&r1=255558&r2=255559&view=diff
==============================================================================
--- libcxxabi/trunk/cmake/config-ix.cmake (original)
+++ libcxxabi/trunk/cmake/config-ix.cmake Mon Dec 14 16:20:04 2015
@@ -42,6 +42,6 @@ check_cxx_compiler_flag(/GR-
check_library_exists(c fopen "" LIBCXXABI_HAS_C_LIB)
check_library_exists(dl dladdr "" LIBCXXABI_HAS_DL_LIB)
check_library_exists(pthread pthread_once "" LIBCXXABI_HAS_PTHREAD_LIB)
-check_library_exists(gcc_eh _Unwind_GetRegionStart "" LIBCXXABI_HAS_GCC_EH_LIB)
+check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXXABI_HAS_GCC_S_LIB)
check_library_exists(c __cxa_thread_atexit_impl ""
LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
Modified: libcxxabi/trunk/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/CMakeLists.txt?rev=255559&r1=255558&r2=255559&view=diff
==============================================================================
--- libcxxabi/trunk/src/CMakeLists.txt (original)
+++ libcxxabi/trunk/src/CMakeLists.txt Mon Dec 14 16:20:04 2015
@@ -40,17 +40,19 @@ if (LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL
add_definitions(-DHAVE___CXA_THREAD_ATEXIT_IMPL)
endif()
-# Generate library list.
+# Generate library list
set(libraries ${LIBCXXABI_CXX_ABI_LIBRARIES})
-append_if(libraries LIBCXXABI_HAS_C_LIB c)
+
if (LIBCXXABI_ENABLE_THREADS)
append_if(libraries LIBCXXABI_HAS_PTHREAD_LIB pthread)
endif()
+append_if(libraries LIBCXXABI_HAS_C_LIB c)
+
if (LIBCXXABI_USE_LLVM_UNWINDER)
list(APPEND libraries unwind)
else()
- append_if(libraries LIBCXXABI_HAS_GCC_EH_LIB gcc_eh)
+ append_if(libraries LIBCXXABI_HAS_GCC_S_LIB gcc_s)
endif()
# Setup flags.
More information about the cfe-commits
mailing list