I have always found it annoying that cd bin/sh && make clean && make all
does not work when cross-compiling. make clean removes the required host
tools and we then end up building them for the target system. This results
in a exec format error when we use them.
This commit passes down the host compiler to the buildworld/buildenv phases
to allow building host binaries during make all. This allows us to remove
lots of duplicate information from Makefile.inc1/Makefile.libcompat (since
they have to list all subdirs with build tools).
The build-tools phase still exists, but should be a no-op unless
LOCAL_TOOL_DIRS is defined. I will open a follow-up review to remove the
entire build-tools phase that can be committed once there are no more
users of LOCAL_TOOL_DIRS.
Obtained from: CheriBSD