List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:March 4 2010 9:19pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (vvaintroub:3126)
Bug#39288
View as plain text  
#At file:///home/vvaintroub/bzr/mysql-next-mr-bugfixing/ based on revid:vvaintroub@stripped

 3126 Vladislav Vaintroub	2010-03-04
      Bug#39288 : create a shared libmysqld.so.
       
      Plugins are unlikely to work with libmysqld.so, as we do
      _not_ force plugin to export all symbols. Exporting all symbols is definitely possible, on some platforms with  whole-archive, -rdynamic or similar hacks. However, it makes much more sense to finish the "Server API" so neither mysqld nor libmysqld needs to export anything.

    modified:
      cmake/libutils.cmake
      libmysqld/CMakeLists.txt
=== modified file 'cmake/libutils.cmake'
--- a/cmake/libutils.cmake	2010-01-26 12:47:34 +0000
+++ b/cmake/libutils.cmake	2010-03-04 21:19:38 +0000
@@ -262,6 +262,16 @@ MACRO(MERGE_LIBRARIES)
     MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}")
   ENDIF()
   SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "")
+
+  IF(ARG_SHARED AND LINK_FLAG_NO_UNDEFINED)
+    # Do not allow undefined symbols in shared libraries
+    GET_TARGET_PROPERTY(TARGET_LINK_FLAGS ${TARGET} LINK_FLAGS)
+    IF(NOT TARGET_LINK_FLAGS)
+      SET(TARGET_LINK_FLAGS)
+    ENDIF()
+    SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_FLAGS 
+      "${TARGET_LINK_FLAGS} ${LINK_FLAG_NO_UNDEFINED}")
+  ENDIF() 
 ENDMACRO()
 
 FUNCTION(GET_DEPENDEND_OS_LIBS target result)

=== modified file 'libmysqld/CMakeLists.txt'
--- a/libmysqld/CMakeLists.txt	2010-02-20 19:40:03 +0000
+++ b/libmysqld/CMakeLists.txt	2010-03-04 21:19:38 +0000
@@ -131,6 +131,17 @@ IF(MSVC)
  INSTALL_DEBUG_TARGET(mysqlserver DESTINATION ${INSTALL_LIBDIR}/debug)
 ENDIF()
 
-IF(MSVC AND NOT DISABLE_SHARED)
-  MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS})
+IF(NOT DISABLE_SHARED)
+  MERGE_LIBRARIES(libmysqld SHARED mysqlserver EXPORTS ${CLIENT_API_FUNCTIONS})
+  IF(UNIX)
+    # Name the shared library, handle versioning (provides same api as client library
+    # hence the same version)
+    SET_TARGET_PROPERTIES(libmysqld PROPERTIES 
+      OUTPUT_NAME mysqld 
+      VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0" 
+      SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
+    # Clean direct output flags, as 2 targets have the same base name (libmysqld)
+    SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+    SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+  ENDIF()
 ENDIF()


Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20100304211938-s4q670kga6a0ottt.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (vvaintroub:3126)Bug#39288Vladislav Vaintroub4 Mar