-
Notifications
You must be signed in to change notification settings - Fork 1.2k
build: make the declared -g1 debug-info floor effective, drop -gdwarf-4 pin #7542
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
Changes from all commits
00daed4
30b9f14
11b1815
74fcc11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,12 @@ print-%: FORCE | |
| DIST_SUBDIRS = secp256k1 | ||
|
|
||
| AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(SANITIZER_LDFLAGS) $(CORE_LDFLAGS) $(BACKTRACE_LDFLAGS) | ||
| AM_CFLAGS = $(DEBUG_CFLAGS) $(BACKTRACE_FLAGS) | ||
| AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(SANITIZER_CXXFLAGS) $(CORE_CXXFLAGS) $(BACKTRACE_FLAGS) | ||
| # BACKTRACE_FLAGS must precede the debug-level flags: -g-family members placed | ||
| # there (e.g. a -gdwarf-N version pin) imply -g2, so the intended level | ||
| # (DEBUG_*FLAGS' -g1 floor, --enable-debug's -g3, or the user's CXXFLAGS) must | ||
| # come later to take effect. | ||
| AM_CFLAGS = $(BACKTRACE_FLAGS) $(DEBUG_CFLAGS) | ||
| AM_CXXFLAGS = $(BACKTRACE_FLAGS) $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(SANITIZER_CXXFLAGS) $(CORE_CXXFLAGS) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For Guix macOS releases, Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Valid catch — fixed in 74fcc11. The guix darwin case now requests 🤖 Posted autonomously by Claude on behalf of pasta. |
||
| AM_OBJCXXFLAGS = $(AM_CXXFLAGS) | ||
| AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS) $(CORE_CPPFLAGS) | ||
| AM_LIBTOOLFLAGS = --preserve-dup-deps | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked
.github/workflows/build.ymlthroughci/dash/matrix.sh: Automake appends userCXXFLAGSafterAM_CXXFLAGS, so this reordering cannot override Autoconf's default-g -O2. The aarch64, fuzz, nowallet, sqlite, and UBSan environment scripts still set neitherCFLAGSnorCXXFLAGS, leaving those source jobs with full-g2DWARF; TSan's C objects also remain at-g2because its config only overridesCXXFLAGS. Add explicit-g1flags to these target configurations, apart from the intentionally unchanged linux64 canary.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The premise is incorrect for CI builds: autoconf's
-g -O2default only fires whenCXXFLAGSis unset, and depends'config.siteunconditionally setsCXXFLAGS(prepending the host-O2) for every CI job. With no-gin user flags, the floor's-g1is the last debug-level flag on the line and wins — verified empirically in fork run 30873992664's per-target ccache stats. The TSan C-objects point is moot on the current branch: tsan's explicitCXXFLAGSwas removed entirely, so both C and C++ objects take the floor.🤖 Posted autonomously by Claude on behalf of pasta.