Third-party: improve binutils build script on macOS

This commit is contained in:
Will Martin
2026-02-08 17:38:56 +09:00
committed by Herman S.
parent 4505af2bfd
commit a069d9446b
Vendored Regular → Executable
+13 -1
View File
@@ -9,7 +9,19 @@ echo "Building binutils from snapshot version $SNAPSHOT_VERSION..."
echo ""
echo "Ensure you have the following packages installed:"
echo " build-essential texinfo flex bison"
if [[ "$(uname)" == "Darwin" ]]; then
echo " bison flex texinfo (e.g. via Homebrew)"
if command -v brew >/dev/null 2>&1; then
for tool in bison flex texinfo; do
prefix="$(brew --prefix "$tool" 2>/dev/null || true)"
if [[ -n "$prefix" ]]; then
export PATH="$prefix/bin:$PATH"
fi
done
fi
else
echo " build-essential texinfo flex bison"
fi
echo ""
echo "Removing old output..."