浏览代码

package/snort: fix sparc build with BR2_OPTIMIZE_FAST

Fix the following sparc build failure with BR2_OPTIMIZE_FAST raised
since bump to version 2.9.19 in commit
65ed981ce0135379b7faeb69519f4e3e666c0717:

cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'

Fixes:
 - http://autobuild.buildroot.org/results/e1a330e1a899fcdf4900e9156d62c90813321e30

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 5ea5ac0c60bb91af0e50302253ac2a576d3cf2ab)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Fabrice Fontaine 3 年之前
父节点
当前提交
86e5503e8d
共有 1 个文件被更改,包括 24 次插入0 次删除
  1. 24 0
      package/snort/0008-Fix-NO-OPTIMIZE.patch

+ 24 - 0
package/snort/0008-Fix-NO-OPTIMIZE.patch

@@ -0,0 +1,24 @@
+Fix NO_OPTIMIZE
+
+Fix the following build failure when NO_OPTIMIZE is enabled (e.g. on
+sparc) and -Ofast:
+
+cc1: error: argument to '-O' should be a non-negative integer, 'g', 's' or 'fast'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/e1a330e1a899fcdf4900e9156d62c90813321e30
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+diff -Nura snort-2.9.19.orig/configure.in snort-2.9.19/configure.in
+--- snort-2.9.19.orig/configure.in	2022-08-09 20:21:00.236777320 +0200
++++ snort-2.9.19/configure.in	2022-08-09 20:29:02.260993315 +0200
+@@ -1694,7 +1694,7 @@
+ 
+ # 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[0-9a-z]*/-O0/"`
+ 
+     # in case user override doesn't include -O
+     if echo $CFLAGS | grep -qve -O0 ; then