Commit ef482374 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

couple of tweaks for solaris on sparc, link with librt, as it defines sched_yield

parent 0f3b102d
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
# On Solaris, /opt/csw often contains a newer bison
IF(NOT BISON_EXECUTABLE AND EXISTS /opt/csw/bin/bison)
SET(BISON_EXECUTABLE /opt/csw/bin/bison)
ENDIF()
ENDIF()
FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable") FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
MARK_AS_ADVANCED(BISON_EXECUTABLE "") MARK_AS_ADVANCED(BISON_EXECUTABLE "")
IF(NOT BISON_EXECUTABLE) IF(NOT BISON_EXECUTABLE)
......
...@@ -92,7 +92,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX) ...@@ -92,7 +92,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
# mininal architecture flags, i486 enables GCC atomics # mininal architecture flags, i486 enables GCC atomics
ADD_DEFINITIONS(-march=i486) ADD_DEFINITIONS(-march=i486)
ENDIF() ENDIF()
ENDIF(CMAKE_COMPILER_IS_GNUCXX) ENDIF()
# Large files # Large files
...@@ -150,9 +150,10 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "HP-UX" ) ...@@ -150,9 +150,10 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "HP-UX" )
ENDIF() ENDIF()
ENDIF() ENDIF()
# Ensure we have clean build for shared libraries
# without extra dependencies and without unresolved symbols
# (on system that support it)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Ensure we have clean build for shared libraries
# without extra dependencies and without unresolved symbols
FOREACH(LANG C CXX) FOREACH(LANG C CXX)
STRING(REPLACE "-rdynamic" "" STRING(REPLACE "-rdynamic" ""
CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
...@@ -164,7 +165,6 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") ...@@ -164,7 +165,6 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined") SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined")
ENDIF() ENDIF()
#Some OS specific hacks #Some OS specific hacks
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000) ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
...@@ -276,15 +276,17 @@ IF(UNIX) ...@@ -276,15 +276,17 @@ IF(UNIX)
MY_SEARCH_LIBS(__infinity m LIBM) MY_SEARCH_LIBS(__infinity m LIBM)
ENDIF() ENDIF()
MY_SEARCH_LIBS(gethostbyname_r "nsl_r;nsl" LIBNLS) MY_SEARCH_LIBS(gethostbyname_r "nsl_r;nsl" LIBNLS)
MY_SEARCH_LIBS(bind bind 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(dlopen dl LIBDL)
MY_SEARCH_LIBS(sched_yield rt LIBRT)
FIND_PACKAGE(Threads) FIND_PACKAGE(Threads)
SET(CMAKE_REQUIRED_LIBRARIES SET(CMAKE_REQUIRED_LIBRARIES
${LIBM} ${LIBNLS} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT}) ${LIBM} ${LIBNLS} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT}) LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT})
OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF) OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF)
......
...@@ -64,5 +64,5 @@ IF(UNIX) ...@@ -64,5 +64,5 @@ IF(UNIX)
ENDIF() 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}
${LIBNLS} ${LIBM}) ${LIBNLS} ${LIBM} ${LIBRT})
DTRACE_INSTRUMENT(mysys) DTRACE_INSTRUMENT(mysys)
...@@ -132,14 +132,18 @@ TARGET_LINK_LIBRARIES(mysqld ${MYSQLD_STATIC_PLUGIN_LIBS} ...@@ -132,14 +132,18 @@ TARGET_LINK_LIBRARIES(mysqld ${MYSQLD_STATIC_PLUGIN_LIBS}
mysys dbug strings vio regex ${SQL_LIB} mysys dbug strings vio regex ${SQL_LIB}
${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${LIBWRAP} ${LIBCRYPT} ${LIBDL}
${ZLIB_LIBRARY} ${SSL_LIBRARIES}) ${ZLIB_LIBRARY} ${SSL_LIBRARIES})
# Provide plugins with minimal set of libraries
SET(INTERFACE_LIBS ${LIBRT})
IF(INTERFACE_LIBS)
SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_INTERFACE_LIBRARIES
"${INTERFACE_LIBS}")
ENDIF()
INSTALL(TARGETS mysqld DESTINATION bin) INSTALL(TARGETS mysqld DESTINATION bin)
INSTALL_DEBUG_SYMBOLS(mysqld) INSTALL_DEBUG_SYMBOLS(mysqld)
FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
MARK_AS_ADVANCED(BISON_EXECUTABLE "")
# Handle out-of-source build from source package with possibly broken # Handle out-of-source build from source package with possibly broken
# bison. Copy bison output to from source to build directory, if not already # bison. Copy bison output to from source to build directory, if not already
# there # 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