Merge pull request #18038 from taosdata/fix/m23
merge branch main into 3.0
This commit is contained in:
commit
ec6dbb495c
|
@ -102,6 +102,12 @@ IF ("${CPUTYPE}" STREQUAL "")
|
||||||
SET(TD_ARM_64 TRUE)
|
SET(TD_ARM_64 TRUE)
|
||||||
ADD_DEFINITIONS("-D_TD_ARM_")
|
ADD_DEFINITIONS("-D_TD_ARM_")
|
||||||
ADD_DEFINITIONS("-D_TD_ARM_64")
|
ADD_DEFINITIONS("-D_TD_ARM_64")
|
||||||
|
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
|
||||||
|
MESSAGE(STATUS "The current platform is loongarch64")
|
||||||
|
SET(PLATFORM_ARCH_STR "loongarch64")
|
||||||
|
SET(TD_LOONGARCH_64 TRUE)
|
||||||
|
ADD_DEFINITIONS("-D_TD_LOONGARCH_")
|
||||||
|
ADD_DEFINITIONS("-D_TD_LOONGARCH_64")
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
ELSE ()
|
ELSE ()
|
||||||
# if generate ARM version:
|
# if generate ARM version:
|
||||||
|
@ -118,6 +124,12 @@ ELSE ()
|
||||||
ADD_DEFINITIONS("-D_TD_ARM_")
|
ADD_DEFINITIONS("-D_TD_ARM_")
|
||||||
ADD_DEFINITIONS("-D_TD_ARM_64")
|
ADD_DEFINITIONS("-D_TD_ARM_64")
|
||||||
SET(TD_ARM_64 TRUE)
|
SET(TD_ARM_64 TRUE)
|
||||||
|
ELSEIF (${CPUTYPE} MATCHES "loongarch64")
|
||||||
|
SET(PLATFORM_ARCH_STR "loongarch64")
|
||||||
|
MESSAGE(STATUS "input cpuType: loongarch64")
|
||||||
|
SET(TD_LOONGARCH_64 TRUE)
|
||||||
|
ADD_DEFINITIONS("-D_TD_LOONGARCH_")
|
||||||
|
ADD_DEFINITIONS("-D_TD_LOONGARCH_64")
|
||||||
ELSEIF (${CPUTYPE} MATCHES "mips64")
|
ELSEIF (${CPUTYPE} MATCHES "mips64")
|
||||||
SET(PLATFORM_ARCH_STR "mips")
|
SET(PLATFORM_ARCH_STR "mips")
|
||||||
MESSAGE(STATUS "input cpuType: mips64")
|
MESSAGE(STATUS "input cpuType: mips64")
|
||||||
|
|
|
@ -14,7 +14,7 @@ Note: ● means officially tested and verified, ○ means unofficially tested an
|
||||||
|
|
||||||
## List of supported platforms for TDengine clients and connectors
|
## List of supported platforms for TDengine clients and connectors
|
||||||
|
|
||||||
TDengine's connector can support a wide range of platforms, including X64/X86/ARM64/ARM32/MIPS/Alpha hardware platforms and Linux/Win64/Win32/macOS development environments.
|
TDengine's connector can support a wide range of platforms, including X64/X86/ARM64/ARM32/MIPS/Alpha/LoongArch64 hardware platforms and Linux/Win64/Win32/macOS development environments.
|
||||||
|
|
||||||
The comparison matrix is as follows.
|
The comparison matrix is as follows.
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ description: "TDengine 服务端、客户端和连接器支持的平台列表"
|
||||||
|
|
||||||
## TDengine 客户端和连接器支持的平台列表
|
## TDengine 客户端和连接器支持的平台列表
|
||||||
|
|
||||||
目前 TDengine 的连接器可支持的平台广泛,目前包括:X64/X86/ARM64/ARM32/MIPS/Alpha 等硬件平台,以及 Linux/Win64/Win32/macOS 等开发环境。
|
目前 TDengine 的连接器可支持的平台广泛,目前包括:X64/X86/ARM64/ARM32/MIPS/LoongArch64 等硬件平台,以及 Linux/Win64/Win32/macOS 等开发环境。
|
||||||
|
|
||||||
对照矩阵如下:
|
对照矩阵如下:
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
# dockerbuild.sh
|
# dockerbuild.sh
|
||||||
# -c [aarch32 | aarch64 | amd64 | x86 | mips64 ...]
|
# -c [aarch32 | aarch64 | amd64 | x86 | mips64 | loongarch64...]
|
||||||
# -n [version number]
|
# -n [version number]
|
||||||
# -p [password for docker hub]
|
# -p [password for docker hub]
|
||||||
# -V [stable | beta]
|
# -V [stable | beta]
|
||||||
|
@ -57,7 +57,7 @@ do
|
||||||
dockerLatest=$(echo $OPTARG)
|
dockerLatest=$(echo $OPTARG)
|
||||||
;;
|
;;
|
||||||
h)
|
h)
|
||||||
echo "Usage: `basename $0` -c [aarch32 | aarch64 | amd64 | x86 | mips64 ...] "
|
echo "Usage: `basename $0` -c [aarch32 | aarch64 | amd64 | x86 | mips64 | loongarch64...] "
|
||||||
echo " -n [version number] "
|
echo " -n [version number] "
|
||||||
echo " -p [password for docker hub] "
|
echo " -p [password for docker hub] "
|
||||||
echo " -V [stable | beta] "
|
echo " -V [stable | beta] "
|
||||||
|
@ -136,4 +136,4 @@ if [ "$cloudBuild" != "y" ] && [ ${dockerLatest} == 'y' ] ;then
|
||||||
docker push tdengine/tdengine-${dockername}:latest
|
docker push tdengine/tdengine-${dockername}:latest
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f ${pkgFile}
|
rm -f ${pkgFile}
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
# dockerbuild.sh
|
# dockerbuild.sh
|
||||||
# -c [aarch32 | aarch64 | amd64 | x86 | mips64 ...]
|
# -c [aarch32 | aarch64 | amd64 | x86 | mips64 | loongarch64...]
|
||||||
# -n [version number]
|
# -n [version number]
|
||||||
# -p [password for docker hub]
|
# -p [password for docker hub]
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ do
|
||||||
passWord=$(echo $OPTARG)
|
passWord=$(echo $OPTARG)
|
||||||
;;
|
;;
|
||||||
h)
|
h)
|
||||||
echo "Usage: `basename $0` -c [aarch32 | aarch64 | amd64 | x86 | mips64 ...] "
|
echo "Usage: `basename $0` -c [aarch32 | aarch64 | amd64 | x86 | mips64 | loongarch64...] "
|
||||||
echo " -n [version number] "
|
echo " -n [version number] "
|
||||||
echo " -p [password for docker hub] "
|
echo " -p [password for docker hub] "
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
# release.sh -v [cluster | edge]
|
# release.sh -v [cluster | edge]
|
||||||
# -c [aarch32 | aarch64 | x64 | x86 | mips64 ...]
|
# -c [aarch32 | aarch64 | x64 | x86 | mips64 | loongarch64...]
|
||||||
# -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...]
|
# -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...]
|
||||||
# -V [stable | beta]
|
# -V [stable | beta]
|
||||||
# -l [full | lite]
|
# -l [full | lite]
|
||||||
|
@ -19,7 +19,7 @@ set -e
|
||||||
# set parameters by default value
|
# set parameters by default value
|
||||||
verMode=edge # [cluster, edge, cloud]
|
verMode=edge # [cluster, edge, cloud]
|
||||||
verType=stable # [stable, beta]
|
verType=stable # [stable, beta]
|
||||||
cpuType=x64 # [aarch32 | aarch64 | x64 | x86 | mips64 ...]
|
cpuType=x64 # [aarch32 | aarch64 | x64 | x86 | mips64 loongarch64...]
|
||||||
osType=Linux # [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...]
|
osType=Linux # [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...]
|
||||||
pagMode=full # [full | lite]
|
pagMode=full # [full | lite]
|
||||||
soMode=dynamic # [static | dynamic]
|
soMode=dynamic # [static | dynamic]
|
||||||
|
@ -77,7 +77,7 @@ while getopts "hv:V:c:o:l:s:d:a:n:m:H:" arg; do
|
||||||
;;
|
;;
|
||||||
h)
|
h)
|
||||||
echo "Usage: $(basename $0) -v [cluster | edge] "
|
echo "Usage: $(basename $0) -v [cluster | edge] "
|
||||||
echo " -c [aarch32 | aarch64 | x64 | x86 | mips64 ...] "
|
echo " -c [aarch32 | aarch64 | x64 | x86 | mips64 | loongarch64 ...] "
|
||||||
echo " -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...] "
|
echo " -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...] "
|
||||||
echo " -V [stable | beta] "
|
echo " -V [stable | beta] "
|
||||||
echo " -l [full | lite] "
|
echo " -l [full | lite] "
|
||||||
|
@ -216,7 +216,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check support cpu type
|
# check support cpu type
|
||||||
if [[ "$cpuType" == "x64" ]] || [[ "$cpuType" == "aarch64" ]] || [[ "$cpuType" == "aarch32" ]] || [[ "$cpuType" == "arm64" ]] || [[ "$cpuType" == "arm32" ]] || [[ "$cpuType" == "mips64" ]]; then
|
if [[ "$cpuType" == "x64" ]] || [[ "$cpuType" == "aarch64" ]] || [[ "$cpuType" == "aarch32" ]] || [[ "$cpuType" == "arm64" ]] || [[ "$cpuType" == "arm32" ]] || [[ "$cpuType" == "mips64" ]] || [[ "$cpuType" == "loongarch64" ]] ; then
|
||||||
if [ "$verMode" == "edge" ]; then
|
if [ "$verMode" == "edge" ]; then
|
||||||
# community-version compile
|
# community-version compile
|
||||||
cmake ../ -DCPUTYPE=${cpuType} -DWEBSOCKET=true -DOSTYPE=${osType} -DSOMODE=${soMode} -DDBNAME=${dbName} -DVERTYPE=${verType} -DVERDATE="${build_time}" -DGITINFO=${gitinfo} -DGITINFOI=${gitinfoOfInternal} -DVERNUMBER=${verNumber} -DVERCOMPATIBLE=${verNumberComp} -DPAGMODE=${pagMode} -DBUILD_HTTP=${BUILD_HTTP} -DBUILD_TOOLS=${BUILD_TOOLS} ${allocator_macro}
|
cmake ../ -DCPUTYPE=${cpuType} -DWEBSOCKET=true -DOSTYPE=${osType} -DSOMODE=${soMode} -DDBNAME=${dbName} -DVERTYPE=${verType} -DVERDATE="${build_time}" -DGITINFO=${gitinfo} -DGITINFOI=${gitinfoOfInternal} -DVERNUMBER=${verNumber} -DVERCOMPATIBLE=${verNumberComp} -DPAGMODE=${pagMode} -DBUILD_HTTP=${BUILD_HTTP} -DBUILD_TOOLS=${BUILD_TOOLS} ${allocator_macro}
|
||||||
|
|
|
@ -902,9 +902,11 @@ void taosSetCoreDump(bool enable) {
|
||||||
|
|
||||||
old_len = sizeof(old_usespid);
|
old_len = sizeof(old_usespid);
|
||||||
|
|
||||||
|
#ifndef __loongarch64
|
||||||
if (syscall(SYS__sysctl, &args) == -1) {
|
if (syscall(SYS__sysctl, &args) == -1) {
|
||||||
// printf("_sysctl(kern_core_uses_pid) set fail: %s", strerror(errno));
|
// printf("_sysctl(kern_core_uses_pid) set fail: %s", strerror(errno));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// printf("The old core_uses_pid[%" PRIu64 "]: %d", old_len, old_usespid);
|
// printf("The old core_uses_pid[%" PRIu64 "]: %d", old_len, old_usespid);
|
||||||
|
|
||||||
|
@ -918,9 +920,11 @@ void taosSetCoreDump(bool enable) {
|
||||||
|
|
||||||
old_len = sizeof(old_usespid);
|
old_len = sizeof(old_usespid);
|
||||||
|
|
||||||
|
#ifndef __loongarch64
|
||||||
if (syscall(SYS__sysctl, &args) == -1) {
|
if (syscall(SYS__sysctl, &args) == -1) {
|
||||||
// printf("_sysctl(kern_core_uses_pid) get fail: %s", strerror(errno));
|
// printf("_sysctl(kern_core_uses_pid) get fail: %s", strerror(errno));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// printf("The new core_uses_pid[%" PRIu64 "]: %d", old_len, old_usespid);
|
// printf("The new core_uses_pid[%" PRIu64 "]: %d", old_len, old_usespid);
|
||||||
#endif
|
#endif
|
||||||
|
@ -989,4 +993,4 @@ bool taosCheckCurrentInDll() {
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_)
|
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_) && !defined(_TD_LOONGARCH_)
|
||||||
#include <nmmintrin.h>
|
#include <nmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ static uint32_t table[16][256] = {
|
||||||
0x9c221d09, 0x6e2e10f7, 0x7dd67004, 0x8fda7dfa}
|
0x9c221d09, 0x6e2e10f7, 0x7dd67004, 0x8fda7dfa}
|
||||||
|
|
||||||
};
|
};
|
||||||
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_)
|
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_) && !defined(_TD_LOONGARCH_)
|
||||||
static uint32_t long_shifts[4][256] = {
|
static uint32_t long_shifts[4][256] = {
|
||||||
{0x00000000, 0xe040e0ac, 0xc56db7a9, 0x252d5705, 0x8f3719a3, 0x6f77f90f, 0x4a5aae0a, 0xaa1a4ea6, 0x1b8245b7,
|
{0x00000000, 0xe040e0ac, 0xc56db7a9, 0x252d5705, 0x8f3719a3, 0x6f77f90f, 0x4a5aae0a, 0xaa1a4ea6, 0x1b8245b7,
|
||||||
0xfbc2a51b, 0xdeeff21e, 0x3eaf12b2, 0x94b55c14, 0x74f5bcb8, 0x51d8ebbd, 0xb1980b11, 0x37048b6e, 0xd7446bc2,
|
0xfbc2a51b, 0xdeeff21e, 0x3eaf12b2, 0x94b55c14, 0x74f5bcb8, 0x51d8ebbd, 0xb1980b11, 0x37048b6e, 0xd7446bc2,
|
||||||
|
@ -846,7 +846,7 @@ uint32_t crc32c_sf(uint32_t crci, crc_stream input, size_t length) {
|
||||||
}
|
}
|
||||||
return (uint32_t)crc ^ 0xffffffff;
|
return (uint32_t)crc ^ 0xffffffff;
|
||||||
}
|
}
|
||||||
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_)
|
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_) && !defined(_TD_LOONGARCH_)
|
||||||
/* Apply the zeros operator table to crc. */
|
/* Apply the zeros operator table to crc. */
|
||||||
static uint32_t shift_crc(uint32_t shift_table[][256], uint32_t crc) {
|
static uint32_t shift_crc(uint32_t shift_table[][256], uint32_t crc) {
|
||||||
return shift_table[0][crc & 0xff] ^ shift_table[1][(crc >> 8) & 0xff] ^ shift_table[2][(crc >> 16) & 0xff] ^
|
return shift_table[0][crc & 0xff] ^ shift_table[1][(crc >> 8) & 0xff] ^ shift_table[2][(crc >> 16) & 0xff] ^
|
||||||
|
@ -857,7 +857,7 @@ static uint32_t shift_crc(uint32_t shift_table[][256], uint32_t crc) {
|
||||||
version. Otherwise, use the software version. */
|
version. Otherwise, use the software version. */
|
||||||
uint32_t (*crc32c)(uint32_t crci, crc_stream bytes, size_t len) = crc32c_sf;
|
uint32_t (*crc32c)(uint32_t crci, crc_stream bytes, size_t len) = crc32c_sf;
|
||||||
|
|
||||||
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_)
|
#if !defined(_TD_ARM_) && !defined(_TD_MIPS_) && !defined(_TD_LOONGARCH_)
|
||||||
/* Compute CRC-32C using the Intel hardware instruction. */
|
/* Compute CRC-32C using the Intel hardware instruction. */
|
||||||
uint32_t crc32c_hw(uint32_t crc, crc_stream buf, size_t len) {
|
uint32_t crc32c_hw(uint32_t crc, crc_stream buf, size_t len) {
|
||||||
crc_stream next = buf;
|
crc_stream next = buf;
|
||||||
|
@ -1012,7 +1012,7 @@ uint32_t crc32c_hw(uint32_t crc, crc_stream buf, size_t len) {
|
||||||
#endif // #ifndef _TD_ARM_
|
#endif // #ifndef _TD_ARM_
|
||||||
|
|
||||||
void taosResolveCRC() {
|
void taosResolveCRC() {
|
||||||
#if defined _TD_ARM_ || defined _TD_MIPS_ || defined WINDOWS
|
#if defined _TD_ARM_ || defined _TD_MIPS_ || defined WINDOWS || defined _TD_LOONGARCH_
|
||||||
crc32c = crc32c_sf;
|
crc32c = crc32c_sf;
|
||||||
#else
|
#else
|
||||||
int32_t sse42;
|
int32_t sse42;
|
||||||
|
|
Loading…
Reference in New Issue