git: kernel: Import OpenBSD's genassym.sh tool
Aaron LI
aly at crater.dragonflybsd.org
Fri Nov 20 06:09:38 PST 2026
commit 5717c5b0849d6eb166e6762f8125dd27a1680206
Author: Aaron LI <aly at aaronly.me>
Date: Fri Nov 20 15:30:54 2026 +0800
kernel: Import OpenBSD's genassym.sh tool
The new genassym.sh tool uses special inlined assembly code to create
the "assym.h" (ours named "assym.s") from constant C expressions. It
will replace the current sys/kern/genassym.sh tool, which relies on
the special macros in <sys/assym.h> and a custom CC compilation, and
will help simplify the "assym.s" generation code in kern.post.mk and
kmod.mk.
I compared the genassym.sh tool in both NetBSD and OpenBSD and found
OpenBSD version is better maintained, so I chose their version.
I placed this tool in sys/tools/ directory instead of sys/kern/; I think
the former is a better location as there are already some awk tools, and
this genassym.sh will also be used by libc.
Summary of changes:
share/man/man5/Makefile | 1 +
share/man/man5/genassym.cf.5 | 139 ++++++++++++++++++++++++++++++++
share/man/man8/Makefile | 1 +
share/man/man8/genassym.sh.8 | 93 +++++++++++++++++++++
sys/tools/genassym.sh | 187 +++++++++++++++++++++++++++++++++++++++++++
5 files changed, 421 insertions(+)
create mode 100644 share/man/man5/genassym.cf.5
create mode 100644 share/man/man8/genassym.sh.8
create mode 100644 sys/tools/genassym.sh
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5717c5b0849d6eb166e6762f8125dd27a1680206
--
DragonFly BSD source repository
More information about the Commits
mailing list