pthread-link
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 14 Jun 2017 17:06:20 +0000 (18:06 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 14 Jun 2017 17:06:20 +0000 (18:06 +0100)
1;4601;0c===================================================================

Gbp-Pq: Name pthread-link.diff

clang/tools/libclang/CMakeLists.txt

index 4116ab7db83998dfcca0dbd7e3f41cb27c4af970..136554043b49e82ebdcef051c578b9e359418456 100644 (file)
@@ -56,6 +56,13 @@ endif ()
 find_library(DL_LIBRARY_PATH dl)
 if (DL_LIBRARY_PATH)
   list(APPEND LIBS dl)
+
+endif()
+if (PTHREAD_LIB)
+  # libpthreads overrides some standard library symbols, so main
+  # executable must be linked with it in order to provide consistent
+  # API for all shared libaries loaded by this executable.
+  list(APPEND LIBS ${PTHREAD_LIB})
 endif()
 
 option(LIBCLANG_BUILD_STATIC