aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2019-08-14 22:06:40 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2019-08-14 22:07:06 +0200
commitf418c3379cbad8caaf3e988caf727fe62b218f8c (patch)
tree521019dc1a2c471c4ddb8355b4e7728c8a94a11d /configure.ac
parent67be6d7a177cb14ca8a68b9c6361dfaae9e64f2b (diff)
parentd6ac25bdd96589a71006e3ab3f303b091ffaa9e4 (diff)
downloadbitcoin-f418c3379cbad8caaf3e988caf727fe62b218f8c.tar.xz
Merge #16435: autoconf: Sane `--enable-debug` defaults.
d6ac25bdd96589a71006e3ab3f303b091ffaa9e4 autoconf: Sane --enable-debug defaults. (Carl Dong) Pull request description: ``` Don't optimize even if variables adhere to as-if rule. This is a somewhat sane default for debugging. ``` ----- Fixes: #14830 This is more of a "do something dumb and have people correct you" kind of PR. The end goal is to have a configure flag that will allow for debugging without annoying "optimized out" messages, for developer experiences' sake. This is the minimal diff, but people have suggested `--enable-debug-slow` in the past. ACKs for top commit: jonasschnelli: Tested ACK d6ac25bdd96589a71006e3ab3f303b091ffaa9e4 Tree-SHA512: 7a5576ad1d33850aff1445ccb71b133f654b455da2d1daed2ed1b82ea773965790a62895aeeab74b23a25513ab96dddb670f9dbc593dd0b8c030694206a99ccf
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 35b50ead44..4fd285bc8d 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(