aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Davis <brd@FreeBSD.org>2021-06-11 14:46:11 +0000
committerBrad Davis <brd@FreeBSD.org>2021-06-11 14:46:11 +0000
commitfaf4bc416a364dc166dd4a495f4e9c157fae6bf3 (patch)
treeef4ee603452205e64778cf60536d58c6b58e7b88
parent0b673d6c5b2b727e108435637b6a3dc6eced561c (diff)
downloadports-faf4bc416a364dc166dd4a495f4e9c157fae6bf3.tar.gz
ports-faf4bc416a364dc166dd4a495f4e9c157fae6bf3.zip
security/snort: Pull in patches from pfsense/FreeBSD-ports to improve armv6/v7
- avoid unaligned access to packet memory - disable compiler optimization Approved by: dvl (maintainer) Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--security/snort/files/patch-configure32
1 files changed, 32 insertions, 0 deletions
diff --git a/security/snort/files/patch-configure b/security/snort/files/patch-configure
index 8466f280854d..55a5d82ed4ac 100644
--- a/security/snort/files/patch-configure
+++ b/security/snort/files/patch-configure
@@ -9,3 +9,35 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+@@ -17167,8 +17167,22 @@ else
+ enable_lzma="yes"
+ fi
+
++# any armv6/7 platform has to have this one defined.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for armv6/7" >&5
++$as_echo_n "checking for armv6/v7... " >&6; }
++if eval "echo $host_cpu|grep -i 'armv[6|7]' >/dev/null"; then
++ NO_OPTIMIZE="yes"
++
++$as_echo "#define WORDS_MUSTALIGN 1" >>confdefs.h
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
+
++
+ # Check whether --with-lzma_includes was given.
+ if test "${with_lzma_includes+set}" = set; then :
+ withval=$with_lzma_includes; with_lzma_includes="$withval"
+@@ -18302,7 +18316,7 @@ fi
+
+ # Set to no optimization regardless of what user or autostuff set
+ if test "x$NO_OPTIMIZE" = "xyes"; then
+- CFLAGS=`echo $CFLAGS | sed -e "s/-O./-O0/"`
++ CFLAGS=`echo $CFLAGS | sed -e "s/-O\d/-O0/"`
+
+ # in case user override doesn't include -O
+ if echo $CFLAGS | grep -qve -O0 ; then