Page MenuHomeFreeBSD

libcompat: Use WORLDTMP sysroot
ClosedPublic

Authored by brooks on Mar 28 2022, 6:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 9:02 AM
Unknown Object (File)
Wed, Apr 24, 3:11 AM
Unknown Object (File)
Mon, Apr 22, 10:38 AM
Unknown Object (File)
Mar 22 2024, 5:18 PM
Unknown Object (File)
Feb 14 2024, 3:36 AM
Unknown Object (File)
Dec 24 2023, 10:22 AM
Unknown Object (File)
Dec 24 2023, 10:13 AM
Unknown Object (File)
Dec 24 2023, 10:13 AM

Details

Summary

Now that -m32 is fixed, just install libs in ${WORLDTMP}/lib/lib32
and use the installed headers.

Obtained from: CheriBSD

Diff Detail

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

Event Timeline

Adding powerpc as this effect powerpc64 and I can't test it (the comments about -m32 are only about amd64, powerpc64 builds without additional changes)

All the prerequisites for this change have now landed. We'd like to get this in to reduce diffs to CheriBSD before we add support for multiple libcompat ARCHs in the same buildworld.

This revision is now accepted and ready to land.Jun 30 2022, 5:41 PM

I like this simplification.
arm would have trouble here, but we no longer make compat libs for arm.
Also arm64 doesn't support -m32, and it's a fair ways away from that, but this will add that requirement if we want to build 32-bit arm libraries on 64-bit arm via libcompat.
I think these are both fine, and note them in passing to show they were considered when this change was made.

This revision was automatically updated to reflect the committed changes.

Brooks followed up in email to this commit with the following that seems useful to preserve here.

A better reference would have been a good idea, but listing them all
would be a bit excessive. In this case, more time passed between
committing those changes and this one than I'd planned. You can see the
set with:

git log --grep -m32 a09ea2bbc3053d3b2afdb2f7444e5e57a96bb891~..HEAD

In D34697#808973, @imp wrote:

. . .
Also arm64 doesn't support -m32, . . .

I'll note that arm64 has historically made a little non-lib32 use of -m32. As of a commit back in 2018-Jun-27 share/mk/src.opts.mk has:

# aarch64 needs arm for -m32 support.
.elif ${__T} == "aarch64" && ${__llt:Marm*} != ""
__DEFAULT_DEPENDENT_OPTIONS+=   LLVM_TARGET_ARM/LLVM_TARGET_AARCH64

The commit was described via:

QUOTE
LLVM_TARGET_ALL: Default LLVM_TARGET_ARM on for aarch64.
This is needed for -m32 support which is used in the kernel cloudabi32 module. Tweak the style to make it easier to understand.
END QUOTE

In D34697#808973, @imp wrote:

. . .
arm would have trouble here, but we no longer make compat libs for arm.
. . .

Is that for aarch64 ending up with armv7 (or AArch32) lib32 support? If yes, any notes about what the troubles would be?
(I do not have the background to read into the wording anything specific about the difficulties.)