From: Ivan Maidanski Date: Thu, 19 Jan 2017 07:03:59 +0000 (+0300) Subject: Fix turn off optimization in case of configure --enable-gcov X-Git-Tag: v7.6.0~133 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45896dc;p=libatomic_ops Fix turn off optimization in case of configure --enable-gcov (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). --- diff --git a/configure.ac b/configure.ac index 0a723a4..d3eccf8 100644 --- a/configure.ac +++ b/configure.ac @@ -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)