Created attachment 234167 [details] macOS cross build improvements I'm trying to follow the directions at <https://wiki.freebsd.org/BuildingOnNonFreeBSD> With $ MAKEOBJDIRPREFIX=$HOME/Documents/freebsd/obj tools/build/make.py --debug TARGET=amd64 TARGET_ARCH=amd64 --bootstrap-toolchain buildworld On my particular setup, I noticed two things: /Users/shantonu/Documents/freebsd/src/sys/conf/newvers.sh: line 138: return: can only `return' from a function or sourced script /Applications/Xcode.app/Contents/Developer/usr/bin/make: invalid option -- V Usage: make [options] [target] ... Options: ... bmake[2]: "/Users/shantonu/Documents/freebsd/src/tools/build/Makefile" line 37: You must install the macOS SDK (try xcode-select --install) bmake[2]: stopped in /Users/shantonu/Documents/freebsd/src/tools/build *** Error code 1 The first issue looks like non-POSIX shell usage which adds a bunch of noise at the top of the build log. The second issue might be a me-specific issue that can be improved through the use of "xcrun -sdk macosx -show-sdk-path" to find the macOS SDK, instead of having to hardcode paths for the command-line tools install vs. Xcode from the Mac App Store. I've attached a diff that fixes both these issues.
Thank you for your report and patch. ^Triage: Request feedback from folks involved in referenced wiki page edits