xref: /OK3568_Linux_fs/buildroot/package/snort/0005-fix-sparc.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1When checking if the architecture supports the %time register
2instruction, do not force -mcpu to v9 while doing so. Otherwise it's
3like "let's see if this v9 instruction exists when I force the compiler
4to think I'm using v9", which is non-sensical.
5
6Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
7
8diff -Naurp ./snort-2.9.11.1-orig/configure.in snort-2.9.11.1/configure.in
9--- ./snort-2.9.11.1-orig/configure.in	2018-05-10 12:20:19.253510678 +0200
10+++ snort-2.9.11.1/configure.in	2018-05-10 12:40:18.547584998 +0200
11@@ -942,8 +942,6 @@ fi
12
13 # check for sparc %time register
14 if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
15-    OLD_CFLAGS="$CFLAGS"
16-    CFLAGS="$CFLAGS -mcpu=v9 "
17     AC_MSG_CHECKING([for sparc %time register])
18     AC_RUN_IFELSE(
19     [AC_LANG_PROGRAM(
20@@ -957,8 +955,6 @@ if eval "echo $host_cpu|grep -i sparc >/
21     AC_MSG_RESULT($sparcv9)
22     if test "x$sparcv9" = "xyes"; then
23         AC_DEFINE([SPARCV9],[1],[For sparc v9 with %time register])
24-    else
25-        CFLAGS="$OLD_CFLAGS"
26     fi
27 fi
28
29