Commit Graph

3 Commits

Author SHA1 Message Date
John Audia 8c2ec57462 hyperscan: fix broken build w/ external toolchain
If building with the project external toolchain, the gcc check
fails to set the correct value for TUNE_FLAG to allow the min
supported SSSE3 compiler support test to pass.  This patch hacks
the file to set to the correct value.

Links to upstream bug reports:
https://github.com/openwrt/openwrt/issues/15216
https://github.com/intel/hyperscan/issues/431

Build system: x86/64 (build system toolchain and x86/64 w/ external toolchain (18-Apr-2024 snapshot)
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-04-30 13:59:53 -07:00
John Audia bb574d7b69 hyperscan: symlinks redundant ABI shared objects
Use $(CP) macro rather than $(INSTALL_DATA) to preserve symlinks
on shared objects which saves approx 11.8 M of space.

From hyperscan-runtime_5.4.2-1:

% ls -lh /usr/lib/libhs*
-rw-r--r-- 1 root root 4.7M Feb 16 14:29 /usr/lib/libhs.so
-rw-r--r-- 1 root root 4.7M Feb 16 14:29 /usr/lib/libhs.so.5
-rw-r--r-- 1 root root 4.7M Feb 16 14:29 /usr/lib/libhs.so.5.4.2
-rw-r--r-- 1 root root 1.2M Feb 16 14:29 /usr/lib/libhs_runtime.so
-rw-r--r-- 1 root root 1.2M Feb 16 14:29 /usr/lib/libhs_runtime.so.5
-rw-r--r-- 1 root root 1.2M Feb 16 14:29 /usr/lib/libhs_runtime.so.5.4.2

% grep Installed-Size /usr/lib/opkg/info/hyperscan-runtime.control
Installed-Size: 18370560

From hyperscan-runetime_5.4.2-2 (created by this PR):

% ls -lh /usr/lib/libhs*
lrwxr-xr-x 1 root root   10 Feb 22 15:56 /usr/lib/libhs.so -> libhs.so.5
lrwxr-xr-x 1 root root   14 Feb 22 15:56 /usr/lib/libhs.so.5 -> libhs.so.5.4.2
-rwxr-xr-x 1 root root 4.6M Feb 22 15:27 /usr/lib/libhs.so.5.4.2
lrwxr-xr-x 1 root root   18 Feb 22 15:56 /usr/lib/libhs_runtime.so -> libhs_runtime.so.5
lrwxr-xr-x 1 root root   22 Feb 22 15:56 /usr/lib/libhs_runtime.so.5 -> libhs_runtime.so.5.4.2
-rwxr-xr-x 1 root root 1.2M Feb 22 15:27 /usr/lib/libhs_runtime.so.5.4.2

% grep Installed-Size /usr/lib/opkg/info/hyperscan-runtime.control
Installed-Size: 5918720

Credit to @efahl for pointing this out.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-22 16:04:08 -08:00
John Audia 1db5c54617 hyperscan: new package for speeding up regex ops
Hyperscan is a high performance regular expression matching
library from Intel that runs on x86 platforms and offers
support for Perl Compatible Regular Expressions (PCRE) syntax,
simultaneous matching of groups of regular expressions, and
streaming operations.

This has utility in speeding up snort3.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-12-19 15:05:00 -08:00