git: crunchgen(1): Improve the handling of internal libraries
Aaron LI
aly at crater.dragonflybsd.org
Fri Sep 4 02:42:52 PDT 2026
commit addc09efd987e110a78fbd9df4f06bedf0049907
Author: Aaron LI <aly at aaronly.me>
Date: Fri Sep 4 13:35:21 2026 +0800
crunchgen(1): Improve the handling of internal libraries
Previously, the `libs_int` and `special lib_int` commands specified the
internal libraries by their full paths, following the way of handling of
the shared libraries by `libs_so` and `special lib_so`. However, this
was actually a mistake because the internal libraries require building.
So it was lucky/hacky that rescue/rescue.libcrypto specified the
internal libraries with a combination of source directory and the
library name, e.g.,
```
CRUNCH_INTLIB_grep= ${CRUNCH_PATH_grep}/grep/libgreputils/libgreputils.a
CRUNCH_INTLIB_telnet= ${.CURDIR}/../../lib/libtelnet/libtelnet.a
```
To actually properly support internal libraries, we must explicitly the
source directories, as well as support build options. To this end,
change the `libs_int` and `special lib_int` commands to only specify the
libraries names, and then extend the `special srcdir` to explicitly the
source directory for an internal library. Also enable the
`special objdir` and `special buildopts` commands for internal
libraries.
To make use of the updated feature in crunchgen(1), enhance
<bsd.crunchgen.mk> to generate the necessary `special` commands.
Finally, update rescue/resume.libcrypto accordingly.
Assisted-with: Claude Sonnet 5
Summary of changes:
initrd/rescue.libcrypto/Makefile | 3 +-
initrd/rescue/Makefile | 3 +-
share/mk/bsd.crunchgen.mk | 68 +++++++-----
usr.bin/crunch/crunchgen/crunchgen.1 | 87 ++++++++++++---
usr.bin/crunch/crunchgen/crunchgen.c | 206 ++++++++++++++++++++++++++---------
5 files changed, 267 insertions(+), 100 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/addc09efd987e110a78fbd9df4f06bedf0049907
--
DragonFly BSD source repository
More information about the Commits
mailing list