llvm-toolchain/debian/patches/unwind-force-pthread-dl.diff
2022-12-01 23:39:56 +01:00

29 lines
984 B
Diff

Index: llvm-toolchain-snapshot_16~++20221201113805+5e50b8089aee/libunwind/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_16~++20221201113805+5e50b8089aee.orig/libunwind/CMakeLists.txt
+++ llvm-toolchain-snapshot_16~++20221201113805+5e50b8089aee/libunwind/CMakeLists.txt
@@ -308,14 +308,17 @@ if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
-if (C_SUPPORTS_COMMENT_LIB_PRAGMA)
- if (LIBUNWIND_HAS_DL_LIB)
+list(APPEND LIBUNWIND_LINK_FLAGS "-ldl")
+list(APPEND LIBUNWIND_LINK_FLAGS "-lpthread")
+
+#if (C_SUPPORTS_COMMENT_LIB_PRAGMA)
+# if (LIBUNWIND_HAS_DL_LIB)
add_definitions(-D_LIBUNWIND_LINK_DL_LIB)
- endif()
- if (LIBUNWIND_HAS_PTHREAD_LIB)
+# endif()
+# if (LIBUNWIND_HAS_PTHREAD_LIB)
add_definitions(-D_LIBUNWIND_LINK_PTHREAD_LIB)
- endif()
-endif()
+# endif()
+#endif()
#===============================================================================
# Setup Source Code