Skip to content

Commit bc7cc57

Browse files
committed
doc: explain why we clear CXXFLAGS with enable-debug
1 parent 55ea6fd commit bc7cc57

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ case $host in
361361
esac
362362

363363
if test "$enable_debug" = "yes"; then
364-
dnl Clear default -g -O2 flags
364+
dnl If debugging is enabled, and the user hasn't overriden CXXFLAGS, clear
365+
dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up
366+
dnl with "-O0 -g3 -g -O2".
365367
if test "$CXXFLAGS_overridden" = "no"; then
366368
CXXFLAGS=""
367369
fi

0 commit comments

Comments
 (0)