starrocks/thirdparty/patches/hyperscan-5.4.0.patch

38 lines
1.5 KiB
Diff

diff -rupN hyperscan-5.4.0.orig/CMakeLists.txt hyperscan-5.4.0/CMakeLists.txt
--- hyperscan-5.4.0.orig/CMakeLists.txt 2021-01-13 14:39:34.000000000 +0000
+++ hyperscan-5.4.0/CMakeLists.txt 2022-10-27 16:45:14.590131682 +0000
@@ -482,7 +482,11 @@ if (CORRECT_PCRE_VERSION AND PCRE_BUILD_
set(BUILD_CHIMERA TRUE)
endif()
-add_subdirectory(unit)
+option(BUILD_UNIT "Build Hyperscan unit test (default TRUE)" TRUE)
+if (BUILD_UNIT)
+ add_subdirectory(unit)
+endif()
+
if (EXISTS ${CMAKE_SOURCE_DIR}/tools/CMakeLists.txt)
add_subdirectory(tools)
endif()
@@ -534,7 +538,6 @@ if (CORRECT_PCRE_VERSION AND PCRE_BUILD_
set(BUILD_CHIMERA TRUE)
endif()
-add_subdirectory(unit)
if (EXISTS ${CMAKE_SOURCE_DIR}/tools/CMakeLists.txt)
add_subdirectory(tools)
endif()
diff -rupN hyperscan-5.4.0.orig/cmake/build_wrapper.sh hyperscan-5.4.0/cmake/build_wrapper.sh
--- hyperscan-5.4.0.orig/cmake/build_wrapper.sh 2021-01-13 14:39:34.000000000 +0000
+++ hyperscan-5.4.0/cmake/build_wrapper.sh 2022-10-27 16:45:45.664093592 +0000
@@ -17,7 +17,8 @@ KEEPSYMS=$(mktemp -p /tmp keep.syms.XXXX
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 p -g -D ${LIBC_SO} | sed -s 's/\([^ ]*\).*/^\1$/' >> ${KEEPSYMS}
+nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
# build the object
"$@"
# rename the symbols in the object