aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChun Kuan Lee <ken2812221@gmail.com>2018-06-12 07:50:14 +0000
committerChun Kuan Lee <ken2812221@gmail.com>2018-06-12 07:51:56 +0000
commit9882d1f044133832b3c0809676d5f26a861b9f44 (patch)
treea36dca9ec874fe5734a87dce2bcf93ba8b8df301 /configure.ac
parent7c32b414b6325743c99fed1208bc53ab0fa1996f (diff)
Reset default -g -O2 flags when enable debug
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
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],