]> granicus.if.org Git - libatomic_ops/commitdiff
Fix turn off optimization in case of configure --enable-gcov
authorIvan Maidanski <ivmai@mail.ru>
Thu, 19 Jan 2017 07:03:59 +0000 (10:03 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 19 Jan 2017 07:03:59 +0000 (10:03 +0300)
(fix commit 0d0a16d)

* configure.ac [enable_gcov] (CFLAGS): Change sed regular expression
to avoid [] (as they are not properly handled during autogen), and to
also filter out -Os and -Ofast (-O0 is ignored).

configure.ac

index 0a723a4a3bed67315c0c3fe497e7b52eafb2bf63..d3eccf82d37a097a20f58b58ebbd5c5326e4e27f 100644 (file)
@@ -115,7 +115,7 @@ AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov],
 if test "$enable_gcov" = "yes"; then
   CFLAGS="$CFLAGS --coverage"
   # Turn off code optimization to get accurate line numbers.
-  CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
+  CFLAGS=`echo "$CFLAGS" | sed -e 's/-O\(1\|2\|3\|4\|s\|fast\)\?//g'`
 fi
 
 AC_SUBST(PICFLAG)