HomeFreeBSD

Generalise libcompat to be a list rather than a single option

Description

Generalise libcompat to be a list rather than a single option

Whilst the kernel can support any number of COMPAT_FOO, world can only
build a single libfoo. Upstream this isn't such an issue, since the only
option is lib32 anyway, but downstreams, such as CheriBSD, may wish to
support multiple at the same time. Thus, adjust the top-level Makefiles
to turn _LIBCOMPAT into a _LIBCOMPATS list that gets iterated over, and
adjust bsd.compat.mk to support this use-case.

For the normal NEED_COMPAT/WANT_COMPAT case, LIBCOMPATFOO remain set and
refer to the requested compat's, preserving the current interface. For
the top-level Makefiles those variables are no longer set (since there
is no longer "the" compat) and only the per-compat ones are available.

Reviewed by: brooks, jhb, imp
Differential Revision: https://reviews.freebsd.org/D40571

Details

Provenance
jrtc27Authored on Jun 27 2023, 11:10 PM
Reviewer
brooks
Differential Revision
D40571: Generalise libcompat to be a list rather than a single option
Parents
rG10afc5eada47: Makefile.libcompat: Handle MK_FOO varying for native and compat arches
Branches
Unknown
Tags
Unknown