aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-02-18 15:53:18 +0000
committerfanquake <fanquake@gmail.com>2022-04-02 18:49:43 +0100
commitbc7cc576072703e4521844b949af5ce7d7e4722a (patch)
treea05031cc3c31f4e8fb42c7ca7ab209a9acf1897b /configure.ac
parent55ea6fd2506b84f553c0bd42f48a9cc4393bab47 (diff)
downloadbitcoin-bc7cc576072703e4521844b949af5ce7d7e4722a.tar.xz
doc: explain why we clear CXXFLAGS with enable-debug
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 658b14180a..82497c57a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -361,7 +361,9 @@ case $host in
esac
if test "$enable_debug" = "yes"; then
- dnl Clear default -g -O2 flags
+ dnl If debugging is enabled, and the user hasn't overriden CXXFLAGS, clear
+ dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up
+ dnl with "-O0 -g3 -g -O2".
if test "$CXXFLAGS_overridden" = "no"; then
CXXFLAGS=""
fi