From a069d9446b6065be41f00fbbed4f5df016d6ed20 Mon Sep 17 00:00:00 2001 From: Will Martin Date: Wed, 4 Feb 2026 21:11:18 +0900 Subject: [PATCH] Third-party: improve binutils build script on macOS --- third_party/binutils/build.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) mode change 100644 => 100755 third_party/binutils/build.sh diff --git a/third_party/binutils/build.sh b/third_party/binutils/build.sh old mode 100644 new mode 100755 index 587356210..75ccaf8da --- a/third_party/binutils/build.sh +++ b/third_party/binutils/build.sh @@ -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..."