mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Do not build optimised power crc32 on bigendian
This commit is contained in:
@@ -73,17 +73,21 @@ IF(WITH_INNOBASE_STORAGE_ENGINE OR WITH_XTRADB_STORAGE_ENGINE)
|
|||||||
# We use the InnoDB code directly in case the code changes.
|
# We use the InnoDB code directly in case the code changes.
|
||||||
ADD_DEFINITIONS("-DUNIV_INNOCHECKSUM")
|
ADD_DEFINITIONS("-DUNIV_INNOCHECKSUM")
|
||||||
|
|
||||||
enable_language(ASM)
|
|
||||||
|
|
||||||
SET(INNOBASE_SOURCES
|
SET(INNOBASE_SOURCES
|
||||||
../storage/innobase/buf/buf0checksum.cc
|
../storage/innobase/buf/buf0checksum.cc
|
||||||
../storage/innobase/ut/ut0crc32.cc
|
../storage/innobase/ut/ut0crc32.cc
|
||||||
../storage/innobase/ut/ut0ut.cc
|
../storage/innobase/ut/ut0ut.cc
|
||||||
../storage/innobase/ut/crc32_power8/crc32.S
|
|
||||||
../storage/innobase/ut/crc32_power8/crc32_wrapper.c
|
|
||||||
../storage/innobase/page/page0zip.cc
|
../storage/innobase/page/page0zip.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
|
||||||
|
enable_language(ASM)
|
||||||
|
LIST(APPEND INNOBASE_SOURCES
|
||||||
|
../storage/innobase/ut/crc32_power8/crc32.S
|
||||||
|
../storage/innobase/ut/crc32_power8/crc32_wrapper.c
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
MYSQL_ADD_EXECUTABLE(innochecksum innochecksum.cc ${INNOBASE_SOURCES})
|
MYSQL_ADD_EXECUTABLE(innochecksum innochecksum.cc ${INNOBASE_SOURCES})
|
||||||
TARGET_LINK_LIBRARIES(innochecksum mysys mysys_ssl)
|
TARGET_LINK_LIBRARIES(innochecksum mysys mysys_ssl)
|
||||||
ADD_DEPENDENCIES(innochecksum GenError)
|
ADD_DEPENDENCIES(innochecksum GenError)
|
||||||
|
@@ -362,8 +362,6 @@ IF(MSVC)
|
|||||||
PROPERTIES COMPILE_FLAGS "/wd4003")
|
PROPERTIES COMPILE_FLAGS "/wd4003")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
enable_language(ASM)
|
|
||||||
|
|
||||||
SET(INNOBASE_SOURCES
|
SET(INNOBASE_SOURCES
|
||||||
api/api0api.cc
|
api/api0api.cc
|
||||||
api/api0misc.cc
|
api/api0misc.cc
|
||||||
@@ -478,8 +476,6 @@ SET(INNOBASE_SOURCES
|
|||||||
ut/ut0bh.cc
|
ut/ut0bh.cc
|
||||||
ut/ut0byte.cc
|
ut/ut0byte.cc
|
||||||
ut/ut0crc32.cc
|
ut/ut0crc32.cc
|
||||||
ut/crc32_power8/crc32.S
|
|
||||||
ut/crc32_power8/crc32_wrapper.c
|
|
||||||
ut/ut0dbg.cc
|
ut/ut0dbg.cc
|
||||||
ut/ut0list.cc
|
ut/ut0list.cc
|
||||||
ut/ut0mem.cc
|
ut/ut0mem.cc
|
||||||
@@ -490,6 +486,14 @@ SET(INNOBASE_SOURCES
|
|||||||
ut/ut0wqueue.cc
|
ut/ut0wqueue.cc
|
||||||
ut/ut0timer.cc)
|
ut/ut0timer.cc)
|
||||||
|
|
||||||
|
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
|
||||||
|
enable_language(ASM)
|
||||||
|
LIST(APPEND INNOBASE_SOURCES
|
||||||
|
ut/crc32_power8/crc32.S
|
||||||
|
ut/crc32_power8/crc32_wrapper.c
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_INNODB)
|
IF(WITH_INNODB)
|
||||||
# Legacy option
|
# Legacy option
|
||||||
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
|
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
|
||||||
|
@@ -194,7 +194,7 @@ ut_crc32_power8(
|
|||||||
const byte* buf, /*!< in: data over which to calculate CRC32 */
|
const byte* buf, /*!< in: data over which to calculate CRC32 */
|
||||||
ulint len) /*!< in: data length */
|
ulint len) /*!< in: data length */
|
||||||
{
|
{
|
||||||
#if defined(__powerpc__)
|
#if defined(__powerpc__) && !defined(WORDS_BIGENDIAN)
|
||||||
return crc32_vpmsum(0, buf, len);
|
return crc32_vpmsum(0, buf, len);
|
||||||
#else
|
#else
|
||||||
ut_error;
|
ut_error;
|
||||||
@@ -338,7 +338,8 @@ ut_crc32_init()
|
|||||||
|
|
||||||
#endif /* defined(__GNUC__) && defined(__x86_64__) */
|
#endif /* defined(__GNUC__) && defined(__x86_64__) */
|
||||||
|
|
||||||
#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2)
|
#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2) \
|
||||||
|
&& !defined(WORDS_BIGENDIAN)
|
||||||
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07)
|
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07)
|
||||||
ut_crc32_power8_enabled = true;
|
ut_crc32_power8_enabled = true;
|
||||||
#endif /* defined(__linux__) && defined(__powerpc__) */
|
#endif /* defined(__linux__) && defined(__powerpc__) */
|
||||||
|
@@ -345,8 +345,6 @@ IF (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|||||||
PROPERTIES COMPILE_FLAGS -Od)
|
PROPERTIES COMPILE_FLAGS -Od)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
enable_language(ASM)
|
|
||||||
|
|
||||||
SET(INNOBASE_SOURCES
|
SET(INNOBASE_SOURCES
|
||||||
api/api0api.cc
|
api/api0api.cc
|
||||||
api/api0misc.cc
|
api/api0misc.cc
|
||||||
@@ -464,8 +462,6 @@ SET(INNOBASE_SOURCES
|
|||||||
ut/ut0bh.cc
|
ut/ut0bh.cc
|
||||||
ut/ut0byte.cc
|
ut/ut0byte.cc
|
||||||
ut/ut0crc32.cc
|
ut/ut0crc32.cc
|
||||||
ut/crc32_power8/crc32.S
|
|
||||||
ut/crc32_power8/crc32_wrapper.c
|
|
||||||
ut/ut0dbg.cc
|
ut/ut0dbg.cc
|
||||||
ut/ut0list.cc
|
ut/ut0list.cc
|
||||||
ut/ut0mem.cc
|
ut/ut0mem.cc
|
||||||
@@ -476,6 +472,14 @@ SET(INNOBASE_SOURCES
|
|||||||
ut/ut0wqueue.cc
|
ut/ut0wqueue.cc
|
||||||
ut/ut0timer.cc)
|
ut/ut0timer.cc)
|
||||||
|
|
||||||
|
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
|
||||||
|
enable_language(ASM)
|
||||||
|
LIST(APPEND INNOBASE_SOURCES
|
||||||
|
ut/crc32_power8/crc32.S
|
||||||
|
ut/crc32_power8/crc32_wrapper.c
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
|
MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
|
||||||
DEFAULT RECOMPILE_FOR_EMBEDDED
|
DEFAULT RECOMPILE_FOR_EMBEDDED
|
||||||
LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
|
LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
|
||||||
|
@@ -194,7 +194,7 @@ ut_crc32_power8(
|
|||||||
const byte* buf, /*!< in: data over which to calculate CRC32 */
|
const byte* buf, /*!< in: data over which to calculate CRC32 */
|
||||||
ulint len) /*!< in: data length */
|
ulint len) /*!< in: data length */
|
||||||
{
|
{
|
||||||
#if defined(__powerpc__)
|
#if defined(__powerpc__) && !defined(WORDS_BIGENDIAN)
|
||||||
return crc32_vpmsum(0, buf, len);
|
return crc32_vpmsum(0, buf, len);
|
||||||
#else
|
#else
|
||||||
ut_error;
|
ut_error;
|
||||||
@@ -338,7 +338,8 @@ ut_crc32_init()
|
|||||||
|
|
||||||
#endif /* defined(__GNUC__) && defined(__x86_64__) */
|
#endif /* defined(__GNUC__) && defined(__x86_64__) */
|
||||||
|
|
||||||
#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2)
|
#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2) \
|
||||||
|
&& !defined(WORDS_BIGENDIAN)
|
||||||
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07)
|
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07)
|
||||||
ut_crc32_power8_enabled = true;
|
ut_crc32_power8_enabled = true;
|
||||||
#endif /* defined(__linux__) && defined(__powerpc__) */
|
#endif /* defined(__linux__) && defined(__powerpc__) */
|
||||||
|
Reference in New Issue
Block a user