Hi Dave,
I'm OK with this patchset, and I have tested the patchset, no issues
been noticed so far. Thanks again for your work on this!
Thanks Tao, I applied the patches with one more cleanup, removed the "unconfig"
in `make help` text as we have make distclean now.
Thanks,
Tao Liu
On Tue, Oct 6, 2026 at 9:31 PM Dave Young <yangrr.2009(a)tsinghua.org.cn> wrote:
>
> The embedded gdb module dominates a crash build. Until now it was built with
> everything its own configure enables by default, and with debug information
> for crash and gdb alike, even though crash uses neither gdb's full-screen TUI
> nor the libctf and libbacktrace libraries. At the same time crash's own
> configure rewrote the tracked top-level Makefile in place: the tree was dirty
> after every build, and it was easy to end up with objects built with stale
> flags, since make cannot see that a flag changed.
>
> This series builds only what crash needs, and tidies the interface around the
> build and the release targets. Patches 1-4 trim the build, 5-8 rework the
> configure and release machinery, and 9-11 document and harden the result.
>
> Trimming the build:
>
> build: make debug information optional, off by default
> build: don't build the embedded gdb TUI
> build: don't build the unused libctf and libbacktrace libraries
> build: remove the unused gdb_files, glink, name and ref targets
>
> -g is now opt-in with "make DEBUG=1", for crash and the embedded gdb
both.
> The gdb build no longer compiles its TUI (crash has its own CLI), nor
> libctf and libbacktrace: 68 source files in all. A full native build now
> compiles 599 objects and produces a ~14 MB crash binary.
>
> Reworking configure and the release targets:
>
> build: write the configure variables to Makefile.inc
> build: add a separate srpm target, release only builds the tarball
> build: remove the redundant tar target
> build: make README a static source file
>
> configure no longer edits the Makefile. It writes the variables it manages
> to a generated Makefile.inc, which the Makefile includes after its own
> defaults, so the tracked file is never modified and unconfiguring is just
> removing that file: "make unconfig", or "make distclean", which
also removes
> the extracted gdb tree, the generated configure files and any release
> tarball/spec/source RPM. The release step is split so that "make
release"
> only produces the source tarball and "make srpm" builds the source RPM
from
> it, the redundant "make tar" is gone, and README is a normal source file
> rather than something a release regenerates from the built binary.
>
> Documenting and hardening:
>
> build: add a "make help" target
> README: document the new cleanup and packaging targets
> build: recover from an interrupted embedded-gdb configure
>
> "make help" lists the targets and options, including which target= values
a
> given host accepts. gdb's configure creates config.status early but
> gdb/Makefile late, so an interrupted configure used to look like a complete
> one; a .configured marker written when configure finishes makes the next
> build reconfigure instead, and the remaining failure paths now point at
> "make distclean". README describes the new targets and the cleanup
rules.
>
> Testing:
>
> - fresh native (x86_64) build: 599 objects, ~14 MB crash binary, runs and
> reports crash 9.0.3++;
> - fresh "make target=ARM64" build: links and runs;
> - configure leaves the tracked Makefile untouched, and "make files" no
> longer rewrites README;
> - "make clean", "make unconfig" and "make distclean"
verified, including
> that distclean keeps CFLAGS.extra/LDFLAGS.extra and the downloaded gdb
> tarball;
> - the series applies in order to the current master.
>
> Notes:
>
> - "make tar" produced an unversioned, gdb-less crash.tar.gz next to the
> versioned, gdb-bundled crash-<version>.tar.gz from "make
release". If the
> gdb-less variant is still wanted, it belongs as an option of release
> rather than as a second target.
> - README no longer mirrors help.c's built-in README text; "crash -h
README"
> still substitutes the crash and gdb versions and the date at run time.
> - "make srpm" still triggers rpmbuild's
"%source_date_epoch_from_changelog is
> set, but %changelog has no entries" warning on Fedora/RHEL, because the
> generated spec carries no %changelog. It is cosmetic and left as is.
> - These series were assited by LLM. I have a plan to continue to improve
> the code later, for example remove dead code, maintain the documents
> including the white paper within the git tree. I'd like to convert the
> static html into .rst files, and generate html/pdf dynamically.
> - I'd appreciate for inputs and comments.
>
> Dave Young (11):
> build: remove the unused gdb_files, glink, name and ref targets
> build: make debug information optional, off by default
> build: don't build the embedded gdb TUI
> build: don't build the unused libctf and libbacktrace libraries
> build: write the configure variables to Makefile.inc
> build: add a separate srpm target, release only builds the tarball
> build: remove the redundant tar target
> build: make README a static source file
> build: add a "make help" target
> README: document the new cleanup and packaging targets
> build: recover from an interrupted embedded-gdb configure
>
> .gitignore | 2 +
> Makefile | 174 ++++++++++++++++-----
> README | 32 +++-
> configure.c | 412 +++++++++++++++++++++++++------------------------
> gdb-16.2.patch | 22 ++-
> 5 files changed, 398 insertions(+), 244 deletions(-)
>
> --
> 2.51.1
> --
> Crash-utility mailing list -- devel(a)lists.crash-utility.osci.io
> To unsubscribe send an email to devel-leave(a)lists.crash-utility.osci.io
> https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
> Contribution Guidelines:
https://github.com/crash-utility/crash/wiki
>