Commit 6cefe7d3 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: use predefined CMAKE_DL_LIBS

instead of, say, MY_SEARCH_LIBS(dlopen dl LIBDL)
parent 641f81ba
...@@ -17,7 +17,7 @@ MACRO (CHECK_JEMALLOC) ...@@ -17,7 +17,7 @@ MACRO (CHECK_JEMALLOC)
IF(WITH_JEMALLOC STREQUAL "static") IF(WITH_JEMALLOC STREQUAL "static")
SET(libname jemalloc_pic) SET(libname jemalloc_pic)
SET(CMAKE_REQUIRED_LIBRARIES pthread dl m) SET(CMAKE_REQUIRED_LIBRARIES pthread ${CMAKE_DL_LIBS} m)
SET(what bundled) SET(what bundled)
ELSE() ELSE()
SET(libname jemalloc c) SET(libname jemalloc c)
......
...@@ -135,7 +135,7 @@ MACRO (MYSQL_CHECK_SSL) ...@@ -135,7 +135,7 @@ MACRO (MYSQL_CHECK_SSL)
SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBSOCKET}) SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBSOCKET})
ENDIF() ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "Linux") IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBDL}) SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${CMAKE_DL_LIBS})
ENDIF() ENDIF()
MESSAGE_ONCE(OPENSSL_INCLUDE_DIR "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}") MESSAGE_ONCE(OPENSSL_INCLUDE_DIR "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
......
...@@ -130,7 +130,6 @@ IF(UNIX) ...@@ -130,7 +130,6 @@ IF(UNIX)
MY_SEARCH_LIBS(bind "bind;socket" LIBBIND) MY_SEARCH_LIBS(bind "bind;socket" LIBBIND)
MY_SEARCH_LIBS(crypt crypt LIBCRYPT) MY_SEARCH_LIBS(crypt crypt LIBCRYPT)
MY_SEARCH_LIBS(setsockopt socket LIBSOCKET) MY_SEARCH_LIBS(setsockopt socket LIBSOCKET)
MY_SEARCH_LIBS(dlopen dl LIBDL)
MY_SEARCH_LIBS(sched_yield rt LIBRT) MY_SEARCH_LIBS(sched_yield rt LIBRT)
IF(NOT LIBRT) IF(NOT LIBRT)
MY_SEARCH_LIBS(clock_gettime rt LIBRT) MY_SEARCH_LIBS(clock_gettime rt LIBRT)
...@@ -138,7 +137,7 @@ IF(UNIX) ...@@ -138,7 +137,7 @@ IF(UNIX)
FIND_PACKAGE(Threads) FIND_PACKAGE(Threads)
SET(CMAKE_REQUIRED_LIBRARIES SET(CMAKE_REQUIRED_LIBRARIES
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO}) ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
# Need explicit pthread for gcc -fsanitize=address # Need explicit pthread for gcc -fsanitize=address
IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=") IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread) SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread)
......
...@@ -148,7 +148,7 @@ ENDIF() ...@@ -148,7 +148,7 @@ ENDIF()
SET(LIBS SET(LIBS
dbug strings mysys mysys_ssl pcre vio dbug strings mysys mysys_ssl pcre vio
${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${ZLIB_LIBRARY} ${SSL_LIBRARIES}
${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS}
${MYSQLD_STATIC_PLUGIN_LIBS} ${MYSQLD_STATIC_PLUGIN_LIBS}
sql_embedded sql_embedded
) )
......
...@@ -24,7 +24,7 @@ ENDIF() ...@@ -24,7 +24,7 @@ ENDIF()
IF(WITH_WSREP) IF(WITH_WSREP)
ADD_EXECUTABLE(wsrep_check_version wsrep_check_version.c) ADD_EXECUTABLE(wsrep_check_version wsrep_check_version.c)
TARGET_LINK_LIBRARIES(wsrep_check_version ${LIBDL}) TARGET_LINK_LIBRARIES(wsrep_check_version ${CMAKE_DL_LIBS})
ENDIF() ENDIF()
IF(NOT INSTALL_MYSQLTESTDIR) IF(NOT INSTALL_MYSQLTESTDIR)
......
...@@ -75,7 +75,7 @@ ENDIF() ...@@ -75,7 +75,7 @@ ENDIF()
ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES}) ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY}) ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY})
DTRACE_INSTRUMENT(mysys) DTRACE_INSTRUMENT(mysys)
IF(HAVE_BFD_H) IF(HAVE_BFD_H)
......
...@@ -167,7 +167,7 @@ ADD_LIBRARY(sql STATIC ${SQL_SOURCE}) ...@@ -167,7 +167,7 @@ ADD_LIBRARY(sql STATIC ${SQL_SOURCE})
DTRACE_INSTRUMENT(sql) DTRACE_INSTRUMENT(sql)
TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS} TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
mysys mysys_ssl dbug strings vio pcre mysys mysys_ssl dbug strings vio pcre
${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}
${WSREP_LIB} ${WSREP_LIB}
${SSL_LIBRARIES} ${SSL_LIBRARIES}
${LIBSYSTEMD}) ${LIBSYSTEMD})
......
...@@ -240,7 +240,6 @@ include(build/ac_macros/check_functions.m4) ...@@ -240,7 +240,6 @@ include(build/ac_macros/check_functions.m4)
ac_check_symbols(fpclassify math.h) ac_check_symbols(fpclassify math.h)
ac_check_lib(m fpclassify) ac_check_lib(m fpclassify)
ac_check_lib(dl dlopen)
ac_check_lib(execinfo backtrace) ac_check_lib(execinfo backtrace)
if(HAVE_LIBEXECINFO) if(HAVE_LIBEXECINFO)
set(HAVE_BACKTRACE TRUE) set(HAVE_BACKTRACE TRUE)
......
...@@ -97,7 +97,7 @@ set(GRN_ALL_LIBRARIES ...@@ -97,7 +97,7 @@ set(GRN_ALL_LIBRARIES
${LZ4_LIBS} ${LZ4_LIBS}
${LIBZSTD_LIBS} ${LIBZSTD_LIBS}
${MESSAGE_PACK_LIBS} ${MESSAGE_PACK_LIBS}
${DL_LIBS} ${CMAKE_DL_LIBS}
${M_LIBS} ${M_LIBS}
${WS2_32_LIBS} ${WS2_32_LIBS}
${MRUBY_LIBS} ${MRUBY_LIBS}
......
...@@ -160,7 +160,7 @@ find_package(Threads REQUIRED) ...@@ -160,7 +160,7 @@ find_package(Threads REQUIRED)
if(WIN32) if(WIN32)
set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib) set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib)
else() else()
set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBDL}) set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${CMAKE_DL_LIBS})
endif() endif()
set(ROCKSDB_LIBS rocksdblib}) set(ROCKSDB_LIBS rocksdblib})
......
...@@ -23,4 +23,4 @@ ADD_CONVENIENCE_LIBRARY(wsrep ${WSREP_SOURCES}) ...@@ -23,4 +23,4 @@ ADD_CONVENIENCE_LIBRARY(wsrep ${WSREP_SOURCES})
DTRACE_INSTRUMENT(wsrep) DTRACE_INSTRUMENT(wsrep)
#ADD_EXECUTABLE(listener wsrep_listener.c ${WSREP_SOURCES}) #ADD_EXECUTABLE(listener wsrep_listener.c ${WSREP_SOURCES})
#TARGET_LINK_LIBRARIES(listener ${LIBDL}) #TARGET_LINK_LIBRARIES(listener ${CMAKE_DL_LIBS})
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