1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

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.
This commit is contained in:
Vladislav Vaintroub
2010-02-25 10:57:23 +01:00
parent 2b75f0707b
commit 342c5c2c7f

View File

@@ -30,7 +30,7 @@ SET(LIBM m)
# CMake defined -lthread as thread flag. This crashes in dlopen # CMake defined -lthread as thread flag. This crashes in dlopen
# when trying to load plugins workaround with -lpthread # 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 # Solaris specific large page support
CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h HAVE_DECL_MHA_MAPSIZE_VA) CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h HAVE_DECL_MHA_MAPSIZE_VA)