Page MenuHomeFreeBSD

build: consolidate kldxref and move NO_XREF logic
AcceptedPublic

Authored by kevans on Apr 27 2026, 8:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 18, 5:32 AM
Unknown Object (File)
Wed, Jun 10, 3:12 PM
Unknown Object (File)
Tue, May 26, 11:27 AM
Unknown Object (File)
May 20 2026, 1:41 PM
Unknown Object (File)
May 18 2026, 10:29 AM
Unknown Object (File)
May 17 2026, 1:35 AM
Unknown Object (File)
May 16 2026, 8:04 PM
Unknown Object (File)
May 16 2026, 8:01 PM
Subscribers
None

Details

Reviewers
jhb
jrtc27
imp
Summary

The current application of NO_XREF works fine for normal module builds,
but falls apart quickly for LOCAL_MODULES. In particular, trying to
LOCAL_MODULES in the drm-kmod-firmware modules will often blow up
spectacularly on install as kldxref(8) races against install(1) and the
latter fails horribly when it encounters a module that hasn't finished
installing yet (at its INS@ temporary-file name).

Re-organizing the kldxref logic into kern.mk is maybe a little unusual
for a file that doesn't have any other targets, but it makes enough
sense to consolidate the two occurrences into one shared between the
kmod and kernel build that I think it's fine to push boundaries here.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 72587
Build 69470: arc lint + arc unit

Event Timeline

kevans created this revision.

Left out of the message: I suspect nobody is trying a full sys/modules build outside of installkernel / install from the config(8) generated target, whichever workflow you prefer, so I don't think we're hanging anyone out to dry by sys/modules not doing this anymore

This revision is now accepted and ready to land.Apr 29 2026, 1:30 PM