mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Make MariaDB CRC32-lib platform independence (#780)
Make mariadb crc32 lib platform independent It looks strange that someone can make use of 2 crc libraries (Power64 or AArch64) at the same time. The patch sets macros 'CRC32_LIBRARY' to make platform independence as an optional crc32 library. Change-Id: I68bbf73cafb6a12f7fb105ad57d117b114a8c4af Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
This commit is contained in:
parent
db677cc6ef
commit
ee5124d714
6 changed files with 8 additions and 8 deletions
|
@ -166,7 +166,7 @@ INCLUDE(install_macros)
|
|||
INCLUDE(systemd)
|
||||
INCLUDE(mysql_add_executable)
|
||||
INCLUDE(compile_flags)
|
||||
INCLUDE(crc32-vpmsum)
|
||||
INCLUDE(crc32)
|
||||
|
||||
# Handle options
|
||||
OPTION(DISABLE_SHARED
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
|
||||
SET(HAVE_CRC32_VPMSUM 1)
|
||||
SET(CRC32_VPMSUM_LIBRARY crc32-vpmsum)
|
||||
SET(CRC32_LIBRARY crc32-vpmsum)
|
||||
ADD_SUBDIRECTORY(extra/crc32-vpmsum)
|
||||
ENDIF()
|
|
@ -1,8 +1,8 @@
|
|||
ADD_CONVENIENCE_LIBRARY(${CRC32_VPMSUM_LIBRARY} $<TARGET_OBJECTS:crc32c> $<TARGET_OBJECTS:crc32ieee>)
|
||||
ADD_CONVENIENCE_LIBRARY(${CRC32_LIBRARY} $<TARGET_OBJECTS:crc32c> $<TARGET_OBJECTS:crc32ieee>)
|
||||
ADD_LIBRARY(crc32c OBJECT vec_crc32.c)
|
||||
ADD_LIBRARY(crc32ieee OBJECT vec_crc32.c)
|
||||
|
||||
GET_TARGET_PROPERTY(CFLAGS_CRC32_VPMSUM ${CRC32_VPMSUM_LIBRARY} COMPILE_FLAGS)
|
||||
GET_TARGET_PROPERTY(CFLAGS_CRC32_VPMSUM ${CRC32_LIBRARY} COMPILE_FLAGS)
|
||||
SET_TARGET_PROPERTIES(crc32c crc32ieee PROPERTIES COMPILE_FLAGS "${CFLAGS_CRC32_VPMSUM} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector")
|
||||
SET_TARGET_PROPERTIES(crc32ieee PROPERTIES COMPILE_DEFINITIONS "CRC32_FUNCTION=crc32ieee_vpmsum;CRC32_CONSTANTS_HEADER=\"crc32ieee_constants.h\"")
|
||||
SET_TARGET_PROPERTIES(crc32c PROPERTIES COMPILE_DEFINITIONS "CRC32_FUNCTION=crc32c_vpmsum;CRC32_CONSTANTS_HEADER=\"crc32c_constants.h\"")
|
||||
|
|
|
@ -445,9 +445,9 @@ IF(NOT DISABLE_SHARED)
|
|||
# Clean direct output flags, as 2 targets have the same base name
|
||||
# libmysqld
|
||||
SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
TARGET_LINK_LIBRARIES(libmysqld ${CRC32_VPMSUM_LIBRARY})
|
||||
TARGET_LINK_LIBRARIES(libmysqld ${CRC32_LIBRARY})
|
||||
SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
TARGET_LINK_LIBRARIES(mysqlserver ${CRC32_VPMSUM_LIBRARY})
|
||||
TARGET_LINK_LIBRARIES(mysqlserver ${CRC32_LIBRARY})
|
||||
IF(LIBMYSQLD_SO_EXTRA_LIBS)
|
||||
TARGET_LINK_LIBRARIES(libmysqld ${LIBMYSQLD_SO_EXTRA_LIBS})
|
||||
ENDIF()
|
||||
|
|
|
@ -74,7 +74,7 @@ ENDIF()
|
|||
|
||||
ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(mysys dbug strings mysys_ssl ${ZLIB_LIBRARY}
|
||||
${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_VPMSUM_LIBRARY})
|
||||
${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY})
|
||||
DTRACE_INSTRUMENT(mysys)
|
||||
|
||||
IF(HAVE_BFD_H)
|
||||
|
|
|
@ -153,7 +153,7 @@ MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
|
|||
DEFAULT RECOMPILE_FOR_EMBEDDED
|
||||
LINK_LIBRARIES
|
||||
${ZLIB_LIBRARY}
|
||||
${CRC32_VPMSUM_LIBRARY}
|
||||
${CRC32_LIBRARY}
|
||||
${NUMA_LIBRARY}
|
||||
${LIBSYSTEMD}
|
||||
${LINKER_SCRIPT})
|
||||
|
|
Loading…
Add table
Reference in a new issue