Link with -pthread instead of -lpthread to fix FTBFS on riscv64
authorCeph Packaging Team <team+ceph@tracker.debian.org>
Thu, 26 Aug 2021 08:36:49 +0000 (09:36 +0100)
committerMattias Ellert <mattias.ellert@physics.uu.se>
Thu, 26 Aug 2021 08:36:49 +0000 (09:36 +0100)
Forwarded: no
Last-Update: 2020-03-01

Gbp-Pq: Name riscv64-link-pthread.patch

CMakeLists.txt

index 6a483b2014d7340a671d77f6ea3061cac947daa1..3cfe2775a00c4da4ccdcbe1689421258f8d29a21 100644 (file)
@@ -31,6 +31,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
   set(LINUX ON)
+  set(THREADS_PREFER_PTHREAD_FLAG ON)
   FIND_PACKAGE(Threads)
 elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
   set(FREEBSD ON)