[chore](thirdparty) update vectorscan to 5.7.11 (#29623)

This commit is contained in:
Jerry Hu
2024-01-07 11:41:26 +08:00
committed by GitHub
parent df43b671de
commit e1ff439e63
4 changed files with 56 additions and 37 deletions

View File

@ -350,10 +350,10 @@ echo "Finished patching ${JEMALLOC_DORIS_SOURCE}"
# patch hyperscan
# https://github.com/intel/hyperscan/issues/292
if [[ "${HYPERSCAN_SOURCE}" == "vectorscan-vectorscan-5.4.7" ]]; then
if [[ "${HYPERSCAN_SOURCE}" == "vectorscan-vectorscan-5.4.11" ]]; then
cd "${TP_SOURCE_DIR}/${HYPERSCAN_SOURCE}"
if [[ ! -f "${PATCHED_MARK}" ]]; then
patch -p0 <"${TP_PATCH_DIR}/vectorscan-5.4.7.patch"
patch -p1 <"${TP_PATCH_DIR}/vectorscan-5.4.11.patch"
touch "${PATCHED_MARK}"
fi
cd -

View File

@ -0,0 +1,50 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1db128b..1ffad0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1196,9 +1196,9 @@ endif ()
add_subdirectory(util)
add_subdirectory(unit)
-if (EXISTS ${CMAKE_SOURCE_DIR}/tools/CMakeLists.txt)
- add_subdirectory(tools)
-endif()
+# if (EXISTS ${CMAKE_SOURCE_DIR}/tools/CMakeLists.txt)
+# add_subdirectory(tools)
+# endif()
if (EXISTS ${CMAKE_SOURCE_DIR}/chimera/CMakeLists.txt AND BUILD_CHIMERA)
add_subdirectory(chimera)
endif()
diff --git a/cmake/build_wrapper.sh b/cmake/build_wrapper.sh
index 895610c..becfbf4 100755
--- a/cmake/build_wrapper.sh
+++ b/cmake/build_wrapper.sh
@@ -17,11 +17,11 @@ KEEPSYMS=$(mktemp -p /tmp keep.syms.XXXXX)
LIBC_SO=$("$@" --print-file-name=libc.so.6)
cp ${KEEPSYMS_IN} ${KEEPSYMS}
# get all symbols from libc and turn them into patterns
-nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
+nm -f posix -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
# build the object
"$@"
# rename the symbols in the object
-nm -f p -g ${OUT} | cut -f1 -d' ' | grep -v -f ${KEEPSYMS} | sed -e "s/\(.*\)/\1\ ${PREFIX}_\1/" >> ${SYMSFILE}
+nm -f posix -g ${OUT} | cut -f1 -d' ' | grep -v -f ${KEEPSYMS} | sed -e "s/\(.*\)/\1\ ${PREFIX}_\1/" >> ${SYMSFILE}
if test -s ${SYMSFILE}
then
objcopy --redefine-syms=${SYMSFILE} ${OUT}
diff --git a/src/util/arch/arm/cpuid_inline.h b/src/util/arch/arm/cpuid_inline.h
index f8a59af..3e28d00 100644
--- a/src/util/arch/arm/cpuid_inline.h
+++ b/src/util/arch/arm/cpuid_inline.h
@@ -39,6 +39,10 @@
#endif
#endif
+#if !defined(HWCAP2_SVE2)
+#define HWCAP2_SVE2 0
+#endif
+
#include "ue2common.h"
#include "util/arch/common/cpuid_flags.h"

View File

@ -1,31 +0,0 @@
diff --git CMakeLists.txt CMakeLists.txt
index cb4ba80..9a106e5 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -170,7 +170,7 @@ if (CMAKE_COMPILER_IS_GNUCC AND NOT CROSS_COMPILE)
# arg1 might exist if using ccache
string (STRIP "${CMAKE_C_COMPILER_ARG1}" CC_ARG1)
- set (EXEC_ARGS ${CC_ARG1} -c -Q --help=target -${ARCH_FLAG}=native -mtune=native)
+ set (EXEC_ARGS ${CC_ARG1} -c -Q --help=target -mtune=native)
execute_process(COMMAND ${CMAKE_C_COMPILER} ${EXEC_ARGS}
OUTPUT_VARIABLE _GCC_OUTPUT)
string(FIND "${_GCC_OUTPUT}" "${ARCH_FLAG}" POS)
diff --git cmake/build_wrapper.sh cmake/build_wrapper.sh
index 895610c..becfbf4 100755
--- cmake/build_wrapper.sh
+++ cmake/build_wrapper.sh
@@ -17,11 +17,11 @@ KEEPSYMS=$(mktemp -p /tmp keep.syms.XXXXX)
LIBC_SO=$("$@" --print-file-name=libc.so.6)
cp ${KEEPSYMS_IN} ${KEEPSYMS}
# get all symbols from libc and turn them into patterns
-nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
+nm -f posix -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
# build the object
"$@"
# rename the symbols in the object
-nm -f p -g ${OUT} | cut -f1 -d' ' | grep -v -f ${KEEPSYMS} | sed -e "s/\(.*\)/\1\ ${PREFIX}_\1/" >> ${SYMSFILE}
+nm -f posix -g ${OUT} | cut -f1 -d' ' | grep -v -f ${KEEPSYMS} | sed -e "s/\(.*\)/\1\ ${PREFIX}_\1/" >> ${SYMSFILE}
if test -s ${SYMSFILE}
then
objcopy --redefine-syms=${SYMSFILE} ${OUT}

8
thirdparty/vars.sh vendored
View File

@ -161,10 +161,10 @@ HYPERSCAN_MD5SUM="202f4b42f5dd4a7bb2506445e51a33b9"
MACHINE_TYPE=$(uname -m)
if [[ "${MACHINE_TYPE}" == "aarch64" || "${MACHINE_TYPE}" == 'arm64' ]]; then
echo "use vectorscan instead of hyperscan on aarch64"
HYPERSCAN_DOWNLOAD="https://github.com/VectorCamp/vectorscan/archive/refs/tags/vectorscan/5.4.7.tar.gz"
HYPERSCAN_NAME=vectorscan-5.4.7.tar.gz
HYPERSCAN_SOURCE=vectorscan-vectorscan-5.4.7
HYPERSCAN_MD5SUM="ae924ccce79ef9bf6bf118693ae14fe5"
HYPERSCAN_DOWNLOAD="https://github.com/VectorCamp/vectorscan/archive/refs/tags/vectorscan/5.4.11.tar.gz"
HYPERSCAN_NAME=vectorscan-5.4.11.tar.gz
HYPERSCAN_SOURCE=vectorscan-vectorscan-5.4.11
HYPERSCAN_MD5SUM="e67b70403cba6c1654a9fef4fd15a2f2"
fi
# ragel (dependency for hyperscan)