]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Allow building world without inheriting $PATH
authorarichardson <arichardson@FreeBSD.org>
Mon, 5 Nov 2018 19:51:10 +0000 (19:51 +0000)
committerarichardson <arichardson@FreeBSD.org>
Mon, 5 Nov 2018 19:51:10 +0000 (19:51 +0000)
commitfd5d87df03544ad1b5340b5a86ca7349b2e64eb5
treeee479fe4df80b4fea7557aa8188594be12993287
parentdfd06214d9e51831073b78d3d02a99bea7f5d601
Allow building world without inheriting $PATH

Inheriting $PATH during the build phase can cause the build to fail when
compiling on a different system due to missing build tools or incompatible
versions somewhere in $PATH. This has cause build failures for us before
due to the jenkins slaves still running FreeBSD 10.
Listing the tools we depend on explicitly instead of just using whatever
happens to be in $PATH allows us to check that we don't accidentally add a
new build dependency.

All tools that do no need to be bootstrapped will now be symlinked to
${WORLDTMP}/legacy/bin and during the build phase $PATH will only contain
${WORLDTMP}. There is also a new variable "BOOTSTRAP_ALL_TOOLS" which can
be set to force compiling almost all bootstrap tools instead of symlinking
them. This will not bootstrap tools such as cp,mv, etc. since they may be
used during the build and for those we should really only be using POSIX
compatible options.

Furthermore, this change is required in order to be able to build on
non-FreeBSD hosts. While the same binaries may exist on Linux/MacOS they
often accept different flags or produce incompatible output.

Approved By: brooks (mentor)
Differential Revision: https://reviews.freebsd.org/D16815
Makefile
Makefile.inc1
tools/build/Makefile
tools/tools/nanobsd/embedded/common