-
Notifications
You must be signed in to change notification settings - Fork 37.1k
Preserve user-passed CXXFLAGS with --enable-debug #6434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@gavinandresen looks good to me, agreed that the behavior is unexpected. A few thoughts, though:
|
RE: CPPFLAGS: hmm, then --enable-debug should add -DDEBUG to CPPFLAGS instead of CFLAGS/CXXFLAGS... RE: adding -DDEBUG_LOCKORDER to --enable-debug: sounds good to me. |
Sounds good to me. Although maybe then it should be documented then that the flag doesn't just add debug information, but also enables specific debug functionality. Or maybe that's already clear:
|
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)
513fd9f
to
83b48c8
Compare
Tweaked based on comments: Three changes to how configure --enable-debug behaves:
|
Thanks, looks good. |
83b48c8 configure --enable-debug changes (Gavin Andresen)
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
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
Bitcoin 0.12 misc PRs 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6198 - bitcoin/bitcoin#6206 - bitcoin/bitcoin#5927 - bitcoin/bitcoin#6213 - bitcoin/bitcoin#6061 - bitcoin/bitcoin#6283 (partial, remainder was pulled in #929) - bitcoin/bitcoin#6272 - bitcoin/bitcoin#6316 - bitcoin/bitcoin#6133 - bitcoin/bitcoin#6387 - bitcoin/bitcoin#6401 - bitcoin/bitcoin#6434 - bitcoin/bitcoin#6372 - bitcoin/bitcoin#6447 - bitcoin/bitcoin#6149 - bitcoin/bitcoin#6468 Part of #2074.
I was surprised that this didn't work:
./configure --enable-debug CXXFLAGS="-DDEBUG_LOCKORDER"
@theuni : I don't THINK this will have unintended consequences, is there a reason --enable-debug overwrote CFLAGS/CXXFLAGS?