Bug 270514 - tools/build/Makefile: should include `/opt/local/bin` in PATH for host tools
Summary: tools/build/Makefile: should include `/opt/local/bin` in PATH for host tools
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-29 07:19 UTC by Tim McIntosh
Modified: 2023-11-03 11:39 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim McIntosh 2023-03-29 07:19:27 UTC
MacPorts (the primary packaging system for macOS) places installed tools under `/opt/local/bin` by default. This path should be included in PATH as an alternative to `/usr/local/bin` for cross-building under macOS:

--- tools/build/Makefile.orig	2023-03-29 00:13:46
+++ tools/build/Makefile	2023-03-29 00:14:16
@@ -302,7 +302,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:/opt/local/bin; \
 	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; \