File: buildflags.patch

package info (click to toggle)
rheolef 7.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 88,012 kB
  • sloc: cpp: 110,259; sh: 16,733; makefile: 5,438; python: 1,391; yacc: 218; javascript: 203; xml: 191; awk: 61; sed: 5
file content (26 lines) | stat: -rw-r--r-- 810 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: rheolef/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -1661,13 +1661,20 @@ m4_include(config/acoptim.m4)
 
 # strip all possible -On flags and then force -O3
 # note: use [...] to protect -O[0-9] regular expr
+if test x"${debian_packaging}" = x"yes"; then
+  # debian packaging: -g -O2 is required
+  CXXFLAGS_OPT="-O2"
+else
+  # otherwise: push optim flag
+  CXXFLAGS_OPT="-O3"
+fi
 [
   res=`echo ${CXXFLAGS} | grep -e '-O[0-9]' >/dev/null`
   status=$?
   if test ${status} = 0; then
     CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's/-O[0-9]//g'`
   fi
-  CXXFLAGS="${CXXFLAGS} -O3"
+  CXXFLAGS="${CXXFLAGS} ${CXXFLAGS_OPT}"
 ]
 dnl-------------------------------------------------------------------------
 dnl #`--enable-optim`