Skip to content

Commit 3c9babc

Browse files
committedDec 14, 2015
[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 llvm-svn: 255559
1 parent 7993e18 commit 3c9babc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
 

‎libcxxabi/cmake/config-ix.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ check_cxx_compiler_flag(/GR- LIBCXXABI_HAS_NO_GR_FLAG)
4242
check_library_exists(c fopen "" LIBCXXABI_HAS_C_LIB)
4343
check_library_exists(dl dladdr "" LIBCXXABI_HAS_DL_LIB)
4444
check_library_exists(pthread pthread_once "" LIBCXXABI_HAS_PTHREAD_LIB)
45-
check_library_exists(gcc_eh _Unwind_GetRegionStart "" LIBCXXABI_HAS_GCC_EH_LIB)
45+
check_library_exists(gcc_s __gcc_personality_v0 "" LIBCXXABI_HAS_GCC_S_LIB)
4646
check_library_exists(c __cxa_thread_atexit_impl ""
4747
LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)

‎libcxxabi/src/CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,19 @@ if (LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
4040
add_definitions(-DHAVE___CXA_THREAD_ATEXIT_IMPL)
4141
endif()
4242

43-
# Generate library list.
43+
# Generate library list
4444
set(libraries ${LIBCXXABI_CXX_ABI_LIBRARIES})
45-
append_if(libraries LIBCXXABI_HAS_C_LIB c)
45+
4646
if (LIBCXXABI_ENABLE_THREADS)
4747
append_if(libraries LIBCXXABI_HAS_PTHREAD_LIB pthread)
4848
endif()
4949

50+
append_if(libraries LIBCXXABI_HAS_C_LIB c)
51+
5052
if (LIBCXXABI_USE_LLVM_UNWINDER)
5153
list(APPEND libraries unwind)
5254
else()
53-
append_if(libraries LIBCXXABI_HAS_GCC_EH_LIB gcc_eh)
55+
append_if(libraries LIBCXXABI_HAS_GCC_S_LIB gcc_s)
5456
endif()
5557

5658
# Setup flags.

0 commit comments

Comments
 (0)