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)
Tue, Aug 11, 3:44 PM
Unknown Object (File)
Mon, Aug 10, 10:38 PM
Unknown Object (File)
Sun, Aug 9, 8:40 AM
Unknown Object (File)
Sat, Aug 8, 9:55 AM
Unknown Object (File)
Fri, Aug 7, 11:33 AM
Unknown Object (File)
Sun, Aug 2, 3:31 AM
Unknown Object (File)
Sat, Aug 1, 6:13 AM
Unknown Object (File)
Wed, Jul 29, 4:15 AM
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