Commit d88ea260 authored by Krunal Bauskar's avatar Krunal Bauskar Committed by Daniel Black

MDEV-23137: RocksDB: undefined reference to crc32c_arm64

RocksDB fails to build on arm64: undefined reference to
            `crc32c_arm64(unsigned int, unsigned char const*, unsigned int)'

MariaDB uses storage/rocksdb/build_rocksdb.cmake to compile RocksDB.
Said cmake missed adding crc32c_arm64 compilation target so if
machine native architecture supported crc32 then complier would enable
usage of function defined in crc32c_arm64 causing the listed error.

Added crc32c_arm64 complition target.

closes #1642
parent 186d9d0d
......@@ -442,6 +442,16 @@ else()
util/crc32c_ppc.c
util/crc32c_ppc_asm.S)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
# aarch
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
CHECK_CXX_COMPILER_FLAG("-march=armv8-a+crc+crypto" HAS_ARMV8_CRC)
if(HAS_ARMV8_CRC)
message(STATUS " HAS_ARMV8_CRC yes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crc+crypto -Wno-unused-function")
list(APPEND ROCKSDB_SOURCES
util/crc32c_arm64.cc)
endif(HAS_ARMV8_CRC)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
endif()
SET(SOURCES)
FOREACH(s ${ROCKSDB_SOURCES})
......
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