Index: libcxxabi/trunk/cmake/config-ix.cmake =================================================================== --- libcxxabi/trunk/cmake/config-ix.cmake +++ libcxxabi/trunk/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) Index: libcxxabi/trunk/src/CMakeLists.txt =================================================================== --- libcxxabi/trunk/src/CMakeLists.txt +++ libcxxabi/trunk/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.