Commit ccf2600f authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Do not link with mtmalloc on Solaris.

add WITH_MYSQLD_LIBS for extra linker flags for mysqld
parent 548e2e3e
......@@ -326,15 +326,6 @@ IF(UNIX)
ENDIF()
ENDIF()
IF (CMAKE_SYSTEM_NAME MATCHES "SunOS")
INCLUDE(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(mtmalloc malloc "" HAVE_LIBMTMALLOC)
IF(HAVE_LIBMTMALLOC)
LINK_LIBRARIES(mtmalloc)
ENDIF()
ENDIF()
# Workaround for CMake bug#9051
IF(CMAKE_OSX_SYSROOT)
SET(ENV{CMAKE_OSX_SYSROOT} ${CMAKE_OSX_SYSROOT})
......
......@@ -132,6 +132,7 @@ ENDIF()
SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE)
TARGET_LINK_LIBRARIES(mysqld sql)
# Provide plugins with minimal set of libraries
SET(INTERFACE_LIBS ${LIBRT})
IF(INTERFACE_LIBS)
......@@ -145,6 +146,17 @@ DTRACE_INSTRUMENT_STATIC_LIBS(mysqld
"sql;mysys;${MYSQLD_STATIC_PLUGIN_LIBS}")
SET(WITH_MYSQLD_LIBS "" CACHE STRING "Additional linker flags for mysqld")
MARK_AS_ADVANCED(WITH_MYSQLD_LIBS)
IF(WITH_MYSQLD_LIBS)
GET_TARGET_PROPERTY(mysqld LINK_FLAGS MYSQLD_LINK_FLAGS)
IF(NOT MYSQLD_LINK_FLAGS)
SET(MYSQLD_LINK_FLAGS)
ENDIF()
SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS
"${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LIBS}")
ENDIF()
# Handle out-of-source build from source package with possibly broken
# bison. Copy bison output to from source to build directory, if not already
# there
......
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