[PATCH] libcxxabi must link to dl if using bundled unwind
İsmail Dönmez
ismail at donmez.ws
Mon Aug 18 01:18:30 PDT 2014
Hi danalbert,
Hi,
src/Unwind/AddressSpace.hpp uses dladdr symbol which is defined in dl library. Attached patch adds support for linking to dl library for CMake build system.
Please have a look. Thanks.
http://reviews.llvm.org/D4953
Files:
libcxxabi/cmake/config-ix.cmake
libcxxabi/src/Unwind/CMakeLists.txt
Index: libcxxabi/cmake/config-ix.cmake
===================================================================
--- libcxxabi/cmake/config-ix.cmake
+++ libcxxabi/cmake/config-ix.cmake
@@ -35,5 +35,6 @@
# Check libraries
check_library_exists(c printf "" 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)
Index: libcxxabi/src/Unwind/CMakeLists.txt
===================================================================
--- libcxxabi/src/Unwind/CMakeLists.txt
+++ libcxxabi/src/Unwind/CMakeLists.txt
@@ -59,6 +59,7 @@
# Generate library list.
set(libraries ${LIBCXXABI_CXX_ABI_LIBRARIES})
append_if(libraries LIBCXXABI_HAS_C_LIB c)
+append_if(libraries LIBCXXABI_HAS_DL_LIB dl)
append_if(libraries LIBCXXABI_HAS_PTHREAD_LIB pthread)
target_link_libraries(unwind ${libraries})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4953.12612.patch
Type: text/x-patch
Size: 958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140818/e75cfeff/attachment.bin>
More information about the cfe-commits
mailing list