Skip to content

Commit

Permalink
configure --enable-debug changes
Browse files Browse the repository at this point in the history
Three changes to how configure --enable-debug behaves:

1. Preserve user-passed CXXFLAGS/CFLAGS
2. Compile with -DDEBUG_LOCKORDER
3. Add -DDEBUG -DDEBUG_LOCKORDER to CPPFLAGS (since they are preprocessor options)

Github-Pull: bitcoin#6434
Rebased-From: 83b48c8
  • Loading branch information
gavinandresen authored and luke-jr committed Dec 28, 2015
1 parent c7c8031 commit 899c189
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions configure.ac
Expand Up @@ -147,12 +147,13 @@ AC_ARG_ENABLE([debug],
[enable_debug=no])

if test "x$enable_debug" = xyes; then
CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER"
if test "x$GCC" = xyes; then
CFLAGS="-g3 -O0 -DDEBUG"
CFLAGS="$CFLAGS -g3 -O0"
fi

if test "x$GXX" = xyes; then
CXXFLAGS="-g3 -O0 -DDEBUG"
CXXFLAGS="$CXXFLAGS -g3 -O0"
fi
fi

Expand Down

0 comments on commit 899c189

Please sign in to comment.