Commit 0bc8d9a1 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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.
parent 2771f7b6
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment