Page MenuHomeFreeBSD

Add a
Needs ReviewPublic

Authored by jhb on Tue, Oct 22, 10:21 PM.



This Makefile sets KERN_OPTS. This permits kernel module Makefiles to
use KERN_OPTS to control the value of variables such as SRCS that are
used by for KERN_OPTS values that honor WITH/WITHOUT
options for standalone builds.

Test Plan

Try to do a standalone build of a kernel module that uses tests on
KERN_OPTS (e.g. modules/geom/geom_uzip). It will fail because
KERN_OPTS isn't defined. Adding ".include <>" at the
start of the Makefile locates the and
Makefiles in the kernel source tree and includes them.

I have two other patches in flight (T6 NIC TLS and bhyve save/restore)
that also make use of KERN_OPTS to control SRCS and are affected by

Diff Detail

Lint Skipped
Unit Tests Skipped
Build Status
Buildable 27161
Build 25433: arc lint + arc unit

Event Timeline

jhb created this revision.Tue, Oct 22, 10:21 PM
imp added inline comments.Wed, Oct 23, 5:03 PM

we have this list in 4 places now, including inside of the kernel conf dir. This makes it 5. Any chance you can make it just one too?

jhb added inline comments.Wed, Oct 23, 5:59 PM

The one in sys/conf/ is different (fewer directories) FWIW. I was only aware of this being the third place ( and sys/conf/ being the others). Looks like sys/conf/ which uses the shorter list of dirs from sys/conf/ is the 4th. So we have 2 lists each duplicated twice, and 3 different flavors of the nested '.if'.

imp added inline comments.Thu, Oct 24, 5:56 PM

yea, that's super-ugly :(
I have that I've written.
I'll post a followup after some testing.

imp added a comment.Thu, Oct 24, 6:17 PM
is what I'm thinking. I think I have all the dirs in this one and found all the places we use it.
I've not test tested all the use cases....
so we can work out the sharing issues there.