From 342c5c2c7f99d776c544c29c29b9002eb61a937c Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 25 Feb 2010 10:57:23 +0100 Subject: On Solaris, overwrite CMake's proposed thread library -lthread with -lpthread. -lthread works fine in most cases, but at least with gcc 3.4.6 on x86, dlopen() crashes when libpthread is not used. Note : the workaround existed prior and did not work since CMAKE_THREADS_LIBS_INIT was already in cache. Now, use SET(.. CACHE FORCE) to overwrite the cached value. --- cmake/os/SunOS.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake/os') diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake index 84ac64d8af3..e932e6c2b74 100644 --- a/cmake/os/SunOS.cmake +++ b/cmake/os/SunOS.cmake @@ -30,7 +30,7 @@ SET(LIBM m) # CMake defined -lthread as thread flag. This crashes in dlopen # when trying to load plugins workaround with -lpthread -SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "") +SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "" FORCE) # Solaris specific large page support CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h HAVE_DECL_MHA_MAPSIZE_VA) -- cgit v1.2.1