0005-fix-sparc.patch 1.0 KB

12345678910111213141516171819202122232425262728
  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. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  6. diff -Naurp ./snort-2.9.11.1-orig/configure.in snort-2.9.11.1/configure.in
  7. --- ./snort-2.9.11.1-orig/configure.in 2018-05-10 12:20:19.253510678 +0200
  8. +++ snort-2.9.11.1/configure.in 2018-05-10 12:40:18.547584998 +0200
  9. @@ -942,8 +942,6 @@ fi
  10. # check for sparc %time register
  11. if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
  12. - OLD_CFLAGS="$CFLAGS"
  13. - CFLAGS="$CFLAGS -mcpu=v9 "
  14. AC_MSG_CHECKING([for sparc %time register])
  15. AC_RUN_IFELSE(
  16. [AC_LANG_PROGRAM(
  17. @@ -957,8 +955,6 @@ if eval "echo $host_cpu|grep -i sparc >/
  18. AC_MSG_RESULT($sparcv9)
  19. if test "x$sparcv9" = "xyes"; then
  20. AC_DEFINE([SPARCV9],[1],[For sparc v9 with %time register])
  21. - else
  22. - CFLAGS="$OLD_CFLAGS"
  23. fi
  24. fi