summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-12-14 22:20:04 +0000
committerEric Fiselier <eric@efcs.ca>2015-12-14 22:20:04 +0000
commitf84ec317a9fd6fc681e3d67302980e34a819e9b6 (patch)
tree478a4794baf68b53efd57bf4bad0b59159fd5b59
parente9a7821958bc358b08c8ca42c064d98ab2937450 (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@255559 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--cmake/config-ix.cmake2
-rw-r--r--src/CMakeLists.txt8
2 files changed, 6 insertions, 4 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index ec702e1..1d40b2a 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -42,6 +42,6 @@ check_cxx_compiler_flag(/GR- LIBCXXABI_HAS_NO_GR_FLAG)
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)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b619e4a..502e083 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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.