diff --git a/tools/build/Makefile b/tools/build/Makefile --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -323,7 +323,7 @@ host-symlinks: @echo "Linking host tools into ${DESTDIR}/bin" .for _tool in ${_host_tools_to_symlink} - @export PATH=$${PATH}:/usr/local/bin; \ + @export PATH=$${PATH}:/usr/local/bin:${SYMLINK_BINDIR}; \ source_path=`which ${_tool} || echo /dev/null/no/such`; \ if [ ! -e "$${source_path}" ] ; then \ echo "Cannot find host tool '${_tool}' in PATH ($$PATH)." >&2; false; \ diff --git a/tools/build/make.py b/tools/build/make.py --- a/tools/build/make.py +++ b/tools/build/make.py @@ -155,6 +155,10 @@ help="Directory to look for cc/c++/cpp/ld to build " "target binaries (only needed if XCC/XCPP/XLD " "are not set)") + parser.add_argument("--symlink-bindir", + help="Directory to look for host binaries when " + "symlinking into MAKEOBJDIRPREFIX during " + "host-symlinks") parser.add_argument("--cross-compiler-type", choices=("clang", "gcc"), default="clang", help="Compiler type to find in --cross-bindir (only " @@ -261,6 +265,9 @@ if not want_clean.lower().startswith("y"): bmake_args.append("-DWITHOUT_CLEAN") + if parsed_args.symlink_bindir: + bmake_args.append("SYMLINK_BINDIR=" + parsed_args.symlink_bindir) + env_cmd_str = " ".join( shlex.quote(k + "=" + v) for k, v in new_env_vars.items()) make_cmd_str = " ".join(