summaryrefslogtreecommitdiff
path: root/cmake
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
commit527ff458aad9368453f306a6bfc6fe0715623ff9 (patch)
tree2b5df7190a85eab6e68ee9946b582d973f554f8b /cmake
parentaa52602008fb6104a7b7217df6d55fe7d67d22fd (diff)
downloadmariadb-git-527ff458aad9368453f306a6bfc6fe0715623ff9.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')
-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)