Commit c104d314 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

For libmysqld.so, apply patch to the MySQL Bug#39288 found here

http://lists.mysql.com/commits/102373

It is better than previous attempts to build the libmysqld, 
as it also takes care of

1) -Wl,--no-undefined for shared libraries and 
2) CLEAN_DIRECT_OUTPUT since there are now 2 libraries with 
the same base output name
parent 216d5450
......@@ -277,6 +277,15 @@ MACRO(MERGE_LIBRARIES)
MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
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)
......
......@@ -147,6 +147,17 @@ ENDIF()
IF(NOT DISABLE_SHARED)
MERGE_LIBRARIES(libmysqld SHARED mysqlserver EXPORTS ${CLIENT_API_FUNCTIONS}
COMPONENT Embedded VERSION ${SHARED_LIB_MAJOR_VERSION})
SET_TARGET_PROPERTIES(libmysqld PROPERTIES PREFIX "")
COMPONENT Embedded)
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
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()
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