[Enhancement][Deps] Fix hyperscan build in GCC11 (#12611)

This commit is contained in:
imay 2022-10-27 09:56:42 -07:00 committed by GitHub
parent d193bba4ee
commit 413f96521d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 2 deletions

View File

@ -1,6 +1,6 @@
diff -rupN hyperscan-5.4.0.orig/CMakeLists.txt hyperscan-5.4.0/CMakeLists.txt
--- hyperscan-5.4.0.orig/CMakeLists.txt 2022-10-26 16:40:46.498384371 +0000
+++ hyperscan-5.4.0/CMakeLists.txt 2022-10-26 16:44:28.947137907 +0000
--- 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()
@ -22,3 +22,16 @@ diff -rupN hyperscan-5.4.0.orig/CMakeLists.txt hyperscan-5.4.0/CMakeLists.txt
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