[PATCH] D15440: [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:16:20 PST 2015


EricWF updated the summary for this revision.
EricWF updated this revision to Diff 42772.
EricWF added a comment.

This patch is updated in the following ways:

1. No longer try and remove `-Wl,-z,defs` from the link flags. I think I was mistaken that this caused an issue.
2. No longer try and link libgcc_s before and after libc. It is only linked after libc now. I don't think this will cause issues when building a shared library.
3. Reorder pthread before libc.


http://reviews.llvm.org/D15440

Files:
  cmake/config-ix.cmake
  src/CMakeLists.txt

Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -40,17 +40,19 @@
   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.
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -42,6 +42,6 @@
 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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15440.42772.patch
Type: text/x-patch
Size: 1327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151214/b6cde5f7/attachment.bin>


More information about the cfe-commits mailing list