mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-7398 mysqld segfaults on FreeBSD 10.1 i386 when built with clang 3.4
in cmake tests let's treat clang like gcc (same options, same builtins) in many cases. * don't check the compiler when * testing for -fvisibility=hidden support * testing for HAVE_ABI_CXA_DEMANGLE * testing for HAVE_GCC_ATOMIC_BUILTINS * when removing options with string(replace) * when running ${CC} --version (ignore the error instead) * run ABI checks for clang * use "canonical" gcc flags for clang * fix groonga too Also: * add cmake detection for gcc __atomic_* builtins. they might be supported (__ATOMIC_SEQ_CST is defined), but not for all operand sizes. In particular, 64-bit atomic load is problematic on i386 * cache check results for Windows * remove the test for HAVE_CXXABI_H (HAVE_ABI_CXA_DEMANGLE is suffifient)
This commit is contained in:
@ -308,17 +308,15 @@ INCLUDE(CheckCCompilerFlag)
|
||||
|
||||
SET(VISIBILITY_HIDDEN_FLAG)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX)
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
|
||||
SET(VISIBILITY_HIDDEN_FLAG "-xldscope=hidden")
|
||||
ELSEIF(UNIX)
|
||||
CHECK_C_COMPILER_FLAG("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN)
|
||||
IF(HAVE_VISIBILITY_HIDDEN)
|
||||
SET(VISIBILITY_HIDDEN_FLAG "-fvisibility=hidden")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
|
||||
SET(VISIBILITY_HIDDEN_FLAG "-xldscope=hidden")
|
||||
ENDIF()
|
||||
|
||||
# We try to hide the symbols in yassl/zlib to avoid name clashes with
|
||||
# other libraries like openssl.
|
||||
FUNCTION(RESTRICT_SYMBOL_EXPORTS target)
|
||||
|
Reference in New Issue
Block a user