aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2019-07-22 11:06:01 -0400
committerCarl Dong <contact@carldong.me>2019-07-30 15:58:10 -0400
commitd6ac25bdd96589a71006e3ab3f303b091ffaa9e4 (patch)
tree0d1035df35505acfb6f88ea635c7277998370794 /configure.ac
parent51a6e2c4192913c9c18507d8dfb3302500b26cc3 (diff)
downloadbitcoin-d6ac25bdd96589a71006e3ab3f303b091ffaa9e4.tar.xz
autoconf: Sane --enable-debug defaults.
Don't optimize at all when --enable-debug is supplied. This makes sure that nothing is optimized out.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 4 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 08a850cfa2..e957e06d20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,7 +239,7 @@ AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
# Enable debug
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
- [use debug compiler flags and macros (default is no)])],
+ [use compiler flags and macros suited for debugging (default is no)])],
[enable_debug=$enableval],
[enable_debug=no])
@@ -271,12 +271,9 @@ if test "x$enable_debug" = xyes; then
if test "x$CXXFLAGS_overridden" = xno; then
CXXFLAGS=""
fi
- # Prefer -Og, fall back to -O0 if that is unavailable.
- AX_CHECK_COMPILE_FLAG(
- [-Og],
- [[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -Og"]],
- [AX_CHECK_COMPILE_FLAG([-O0],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"]],,[[$CXXFLAG_WERROR]])],
- [[$CXXFLAG_WERROR]])
+
+ # Disable all optimizations
+ AX_CHECK_COMPILE_FLAG([-O0], [[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -O0"]],,[[$CXXFLAG_WERROR]])
# Prefer -g3, fall back to -g if that is unavailable.
AX_CHECK_COMPILE_FLAG(