Page MenuHomeFreeBSD

Make sure MACHINE(_ARCH) are exported for depend-cleanup.sh
ClosedPublic

Authored by jrtc27 on Jul 10 2023, 11:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 25, 7:52 PM
Unknown Object (File)
Dec 22 2025, 2:36 PM
Unknown Object (File)
Nov 16 2025, 5:30 AM
Unknown Object (File)
Nov 16 2025, 3:13 AM
Unknown Object (File)
Nov 15 2025, 11:23 PM
Unknown Object (File)
Nov 15 2025, 4:59 PM
Unknown Object (File)
Nov 15 2025, 4:58 PM
Unknown Object (File)
Oct 29 2025, 9:38 AM
Subscribers

Details

Summary

We run depend-cleanup.sh twice during the build. The second time is the
normal run, where we run it under WMAKEENV and thus have CROSSENV's
MACHINE(_ARCH)=${TARGET(_ARCH)} in the environment. However, the first
time is for bootstrap-tools, where it's run under BMAKEENV and we don't
have any assignments to MACHINE(_ARCH) in the environment, meaning the
script sees them as unset. In practice this doesn't matter since the
only use doesn't apply to bootstrap-tools, but it could be a future
issue. Thus, explicitly export them for depend-cleanup.sh and have the
script verify they're set.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 52556
Build 49447: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jul 11 2023, 12:02 AM
sjg added inline comments.
tools/build/depend-cleanup.sh
27

FWIW I'd be inclinded to add an error() function - hate repeating logic

test -z "$MACHINE" && error MACHINE not set

etc

tools/build/depend-cleanup.sh
27

I would have done except that D31007 already does that and I didn't feel the need to reorganise things just for that