Page MenuHomeFreeBSD

Rework sys/modules/Makefile to improve arch and option filtering.
AbandonedPublic

Authored by ian on Jul 7 2018, 1:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 30 2024, 6:14 PM
Unknown Object (File)
Apr 30 2024, 6:14 PM
Unknown Object (File)
Apr 30 2024, 2:31 PM
Unknown Object (File)
Dec 20 2023, 4:29 AM
Unknown Object (File)
Dec 6 2023, 6:33 PM
Unknown Object (File)
Nov 10 2023, 9:38 AM
Unknown Object (File)
Nov 6 2023, 11:07 PM
Unknown Object (File)
Nov 6 2023, 8:35 PM
Subscribers

Details

Reviewers
bdrewery
manu
imp
Summary

Currently, modules/Makefile is a tangled mess of .if sections that attempt to build the right set of modules for the current arch, kernel config, and MK_xxxx options in effect. Some of the .if blocks are clumped by functionality, some by arch, some by MK_xxxx option. In general, it's nearly impossible to figure out what might actually get built for a given configuration. It's even harder to figure out where to add the conditional logic for some new module that needs to be excluded from some builds.

The new design is to automatically search for and build all modules except those filtered out. It provides a filtering mechanism based on setting variables to indicate lists of architectures and options based on module/dir name. If there are no variables set for a given module name, that module gets built. If the variables are set, then the module is built as long as the current build architecture and options match the entries in the module's variables.

Rather then restating the list of variables and how they control the filtering here, I'll just mention that a comment block at the top of the Makefile has that info.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 17895

Event Timeline

Except for my comment it looks good to me.
Thanks

sys/modules/Makefile
45

What does ${ARCH}-BROKEN means exactly ?

This revision is now accepted and ready to land.Jul 10 2018, 9:50 AM
sys/modules/Makefile
45

That's just my note to myself that the arch should be i386, but right now it fails to compile.

I would prefer to not commit this with any of the BROKEN stuff in it, that's just what's required now to get a universe build to complete. We need to either fix these or nuke them, having broken code in the tree is pointless.

sbruno added inline comments.
sys/modules/Makefile
45

Intel is aware of the brokenness of the code. It *should*be disabled on -current right now.