Commit 463a8fc5 authored by Daniel Black's avatar Daniel Black

MDEV-22641: postfix - crc32{,c} fixups for ppc64

parent 701efbb2
...@@ -923,7 +923,7 @@ extern int unpackfrm(uchar **, size_t *, const uchar *); ...@@ -923,7 +923,7 @@ extern int unpackfrm(uchar **, size_t *, const uchar *);
void my_checksum_init(void); void my_checksum_init(void);
#ifdef HAVE_CRC32_VPMSUM #ifdef HAVE_CRC32_VPMSUM
extern my_checksum(ha_checksum, const void *, size_t); extern ha_checksum my_checksum(ha_checksum, const void *, size_t);
#else #else
typedef ha_checksum (*my_crc32_t)(ha_checksum, const void *, size_t); typedef ha_checksum (*my_crc32_t)(ha_checksum, const void *, size_t);
extern MYSQL_PLUGIN_IMPORT my_crc32_t my_checksum; extern MYSQL_PLUGIN_IMPORT my_crc32_t my_checksum;
......
...@@ -100,7 +100,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64") ...@@ -100,7 +100,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
ENDIF() ENDIF()
ENDIF() ENDIF()
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64") ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
SET(HAVE_CRC32_VPMSUM 1) SET(HAVE_CRC32_VPMSUM 1 PARENT_SCOPE)
SET(MYSYS_SOURCES ${MYSYS_SOURCES} $<TARGET_OBJECTS:crc32c> $<TARGET_OBJECTS:crc32ieee>) SET(MYSYS_SOURCES ${MYSYS_SOURCES} $<TARGET_OBJECTS:crc32c> $<TARGET_OBJECTS:crc32ieee>)
ADD_LIBRARY(crc32c OBJECT crc32/crc32_ppc64.c) ADD_LIBRARY(crc32c OBJECT crc32/crc32_ppc64.c)
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <my_sys.h> #include <my_sys.h>
#include <zlib.h> #include <zlib.h>
#if !defined(HAVE_CRC32_VPMSUM)
/* TODO: remove this once zlib adds inherent support for hardware accelerated /* TODO: remove this once zlib adds inherent support for hardware accelerated
crc32 for all architectures. */ crc32 for all architectures. */
static unsigned int my_crc32_zlib(unsigned int crc, const void *data, static unsigned int my_crc32_zlib(unsigned int crc, const void *data,
...@@ -26,7 +27,6 @@ static unsigned int my_crc32_zlib(unsigned int crc, const void *data, ...@@ -26,7 +27,6 @@ static unsigned int my_crc32_zlib(unsigned int crc, const void *data,
return (unsigned int) crc32(crc, data, (unsigned int) len); return (unsigned int) crc32(crc, data, (unsigned int) len);
} }
#if !defined(HAVE_CRC32_VPMSUM)
my_crc32_t my_checksum= my_crc32_zlib; my_crc32_t my_checksum= my_crc32_zlib;
#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