From 18660062e6eb972ac44617e8d56a4679b0df2552 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 5 Sep 2021 17:31:49 -0700 Subject: [PATCH] stop attempting to suppress double '-O?' with --enable-debug Similar to the prior commit, there is little advantage to these error prone gymnastics when the compiler is perfectly happy to let a later option supersede an earlier one. Note that for compilers that are not GCC or ICC, this means there optimization flags are no longer altered when passing `--enable-debug`. Related to #2115. --- configure.ac | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure.ac b/configure.ac index aae527bf3..b6778b49d 100644 --- a/configure.ac +++ b/configure.ac @@ -411,10 +411,6 @@ AC_ARG_ENABLE([debug], [enable_debug=no]) AM_CONDITIONAL([DEBUG], [test $enable_debug = "yes"]) if test "x$enable_debug" = "xyes"; then - changequote({,}) - CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'` - CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'` - changequote([,]) dnl add -O0 only if GCC or ICC is used if test "$GCC" = "yes" || test "$ICC" = "yes"; then CFLAGS="$CFLAGS -g -O0 -Wall" -- 2.40.0