s390x support

This commit is contained in:
Suzy Wang 2023-01-23 14:20:49 +00:00
parent 19d26828a0
commit fb46b5ed4d
7 changed files with 14 additions and 7 deletions

View File

@ -126,6 +126,12 @@ elseif (ARCH_PPC64LE)
"${LIBRARY_DIR}/libs/context/src/asm/make_ppc64_sysv_elf_gas.S"
"${LIBRARY_DIR}/libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S"
)
elseif (ARCH_S390X)
set (SRCS_CONTEXT ${SRCS_CONTEXT}
"${LIBRARY_DIR}/libs/context/src/asm/jump_s390x_sysv_elf_gas.S"
"${LIBRARY_DIR}/libs/context/src/asm/make_s390x_sysv_elf_gas.S"
"${LIBRARY_DIR}/libs/context/src/asm/ontop_s390x_sysv_elf_gas.S"
)
elseif (ARCH_RISCV64)
set (SRCS_CONTEXT ${SRCS_CONTEXT}
"${LIBRARY_DIR}/libs/context/src/asm/jump_riscv64_sysv_elf_gas.S"

View File

@ -7,9 +7,9 @@ CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing")
IF(ENABLE_SSE STREQUAL ON AND NOT ARCH_PPC64LE AND NOT ARCH_AARCH64 AND NOT ARCH_AARCH64)
IF(ENABLE_SSE STREQUAL ON AND ARCH_AMD64)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2")
ENDIF(ENABLE_SSE STREQUAL ON AND NOT ARCH_PPC64LE AND NOT ARCH_AARCH64 AND NOT ARCH_AARCH64)
ENDIF()
IF(NOT TEST_HDFS_PREFIX)
SET(TEST_HDFS_PREFIX "./" CACHE STRING "default directory prefix used for test." FORCE)

View File

@ -1,4 +1,4 @@
if(NOT ARCH_AARCH64 AND NOT OS_FREEBSD AND NOT APPLE AND NOT ARCH_PPC64LE)
if(NOT ARCH_AARCH64 AND NOT OS_FREEBSD AND NOT APPLE AND NOT ARCH_PPC64LE AND NOT ARCH_S390X)
option(ENABLE_HDFS "Enable HDFS" ${ENABLE_LIBRARIES})
elseif(ENABLE_HDFS)
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use HDFS3 with current configuration")
@ -70,6 +70,7 @@ set(SRCS
"${HDFS3_SOURCE_DIR}/client/Token.cpp"
"${HDFS3_SOURCE_DIR}/client/PacketPool.cpp"
"${HDFS3_SOURCE_DIR}/client/OutputStream.cpp"
"${HDFS3_SOURCE_DIR}/client/DataReader.cpp"
"${HDFS3_SOURCE_DIR}/rpc/RpcChannelKey.cpp"
"${HDFS3_SOURCE_DIR}/rpc/RpcProtocolInfo.cpp"
"${HDFS3_SOURCE_DIR}/rpc/RpcClient.cpp"

View File

@ -66,7 +66,7 @@
#cmakedefine WITH_SASL_OAUTHBEARER 1
#cmakedefine WITH_SASL_CYRUS 1
// crc32chw
#if !defined(__PPC__) && !defined(__riscv) && !defined(__aarch64__)
#if !defined(__PPC__) && !defined(__riscv) && !defined(__aarch64__) && !defined(__s390x__)
#define WITH_CRC32C_HW 1
#endif
// regex

2
contrib/rocksdb vendored

@ -1 +1 @@
Subproject commit 2c8998e26c6d46b27c710d7829c3a15e34959f70
Subproject commit 66e3cbec31400ed3a23deb878c5d7f56f990f0ae

2
contrib/s2geometry vendored

@ -1 +1 @@
Subproject commit 471fe9dc931a4bb560333545186e9b5da168ac83
Subproject commit 4a7ebd5da04cb6c9ea38bbf5914a9f8f3c768564

View File

@ -94,7 +94,7 @@ inline DB::UInt64 intHashCRC32(DB::UInt64 x)
#elif (defined(__PPC64__) || defined(__powerpc64__)) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
return crc32_ppc(-1U, reinterpret_cast<const unsigned char *>(&x), sizeof(x));
#elif defined(__s390x__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
return s390x_crc32(-1U, x)
return s390x_crc32(-1U, x);
#else
/// On other platforms we do not have CRC32. NOTE This can be confusing.
/// NOTE: consider using intHash32()