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)
Sat, Jan 18, 5:55 PM
Unknown Object (File)
Fri, Jan 3, 5:58 AM
Unknown Object (File)
Sun, Dec 29, 11:45 AM
Unknown Object (File)
Dec 9 2024, 10:39 PM
Unknown Object (File)
Nov 7 2024, 6:34 PM
Unknown Object (File)
Oct 4 2024, 7:07 PM
Unknown Object (File)
Oct 4 2024, 8:19 AM
Unknown Object (File)
Oct 1 2024, 9:25 PM
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 Not Applicable
Unit
Tests Not Applicable

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