Page MenuHomeFreeBSD

Generalise libcompat to be a list rather than a single option
ClosedPublic

Authored by jrtc27 on Jun 15 2023, 9:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 6:46 PM
Unknown Object (File)
Sun, Nov 10, 4:10 PM
Unknown Object (File)
Oct 5 2024, 8:47 PM
Unknown Object (File)
Oct 3 2024, 10:01 PM
Unknown Object (File)
Oct 3 2024, 7:36 AM
Unknown Object (File)
Sep 27 2024, 11:16 PM
Unknown Object (File)
Sep 25 2024, 10:15 AM
Unknown Object (File)
Sep 20 2024, 8:59 AM

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Makefile.inc1
854

How do others get added?

1183

Where does through lowercase version of this get set?

Makefile.inc1
854
.if ${MK_LIB64} == "yes"
_LIBCOMPATS+=	64
.endif

etc; I actually tested this by adding a (pointless) lib64 to amd64 in https://github.com/jrtc27/freebsd-src/commit/b5123f22133f09451edd04ef1a3fca4ff2feb547

1183

Line 107 of bsd.compat.mk (akin to how line 102 used to set libcompat singular)

This revision is now accepted and ready to land.Jun 16 2023, 5:43 PM

That is less painful than I thought it was going to be.

  • Fix build for compat-less arches
  • Fix WMAKE_TGTS filtering, including for universe-toolchain

(tinderbox now succeeds)

This revision now requires review to proceed.Jun 19 2023, 3:26 PM

My questions are answered. Don't see anything else noteworthy

This revision is now accepted and ready to land.Jun 24 2023, 9:39 PM