From 9882d1f044133832b3c0809676d5f26a861b9f44 Mon Sep 17 00:00:00 2001 From: Chun Kuan Lee Date: Tue, 12 Jun 2018 07:50:14 +0000 Subject: Reset default -g -O2 flags when enable debug --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index af60b28c71..a03b3a5758 100644 --- a/configure.ac +++ b/configure.ac @@ -243,6 +243,10 @@ AC_LANG_PUSH([C++]) AX_CHECK_COMPILE_FLAG([-Werror],[CXXFLAG_WERROR="-Werror"],[CXXFLAG_WERROR=""]) if test "x$enable_debug" = xyes; then + # Clear default -g -O2 flags + if test "x$CXXFLAGS_overridden" = xno; then + CXXFLAGS="" + fi # Prefer -Og, fall back to -O0 if that is unavailable. AX_CHECK_COMPILE_FLAG( [-Og], -- cgit v1.2.3