summaryrefslogtreecommitdiff
path: root/cmake/os
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2010-02-25 10:57:23 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2010-02-25 10:57:23 +0100
commit342c5c2c7f99d776c544c29c29b9002eb61a937c (patch)
tree2b5df7190a85eab6e68ee9946b582d973f554f8b /cmake/os
parent2b75f0707b97fc06993e38d25e4768f4f371fac3 (diff)
downloadmariadb-git-342c5c2c7f99d776c544c29c29b9002eb61a937c.tar.gz
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.
Diffstat (limited to 'cmake/os')
-rw-r--r--cmake/os/SunOS.cmake2
1 files changed, 1 insertions, 1 deletions
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)