Add -O2 to CFLAGS by default, -O0 if noopt is set.
authorAlessio Treglia <alessio@debian.org>
Fri, 25 Feb 2022 19:59:30 +0000 (19:59 +0000)
committerSebastian Ramacher <sramacher@debian.org>
Fri, 25 Feb 2022 19:59:30 +0000 (19:59 +0000)
Forwarded: not-needed

Forwarded: not-needed
Gbp-Pq: Name gcc-optflags.patch

configure

index 25d67dc8f2596b97e4149b728c3e1ef824ea43d2..2b34cb51e0a3b0e84e9499e71bd2a643e86be5be 100755 (executable)
--- a/configure
+++ b/configure
@@ -378,7 +378,7 @@ for opt do
             ;;
         --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
             ;;
-        --enable-debug) debuginfo="yes"; no_gcc_opt="yes"
+        --enable-debug) debuginfo="yes";
             ;;
         --disable-opt) no_gcc_opt="yes"
             ;;
@@ -743,7 +743,7 @@ fi
 
 #GCC opt
 if test "$no_gcc_opt" = "no"; then
-    CFLAGS="-O3 $CFLAGS"
+    CFLAGS="-O2 $CFLAGS"
 else
     CFLAGS="-O0 $CFLAGS"
 fi