]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/snort/0005-fix-sparc.patch
snort: fix build on sparc v8
[coffee/buildroot.git] / package / snort / 0005-fix-sparc.patch
1 When checking if the architecture supports the %time register
2 instruction, do not force -mcpu to v9 while doing so. Otherwise it's
3 like "let's see if this v9 instruction exists when I force the compiler
4 to think I'm using v9", which is non-sensical.
5
6 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
7
8 diff -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