0008-Fix-NO-OPTIMIZE.patch 878 B

123456789101112131415161718192021222324
  1. Fix NO_OPTIMIZE
  2. Fix the following build failure when NO_OPTIMIZE is enabled (e.g. on
  3. sparc) and -Ofast:
  4. cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
  5. Fixes:
  6. - http://autobuild.buildroot.org/results/e1a330e1a899fcdf4900e9156d62c90813321e30
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. diff -Nura snort-2.9.19.orig/configure.in snort-2.9.19/configure.in
  9. --- snort-2.9.19.orig/configure.in 2022-08-09 20:21:00.236777320 +0200
  10. +++ snort-2.9.19/configure.in 2022-08-09 20:29:02.260993315 +0200
  11. @@ -1694,7 +1694,7 @@
  12. # Set to no optimization regardless of what user or autostuff set
  13. if test "x$NO_OPTIMIZE" = "xyes"; then
  14. - CFLAGS=`echo $CFLAGS | sed -e "s/-O./-O0/"`
  15. + CFLAGS=`echo $CFLAGS | sed -e "s/-O[0-9a-z]*/-O0/"`
  16. # in case user override doesn't include -O
  17. if echo $CFLAGS | grep -qve -O0 ; then