From 293855f7b9a222c07c1b30c078bfa07031eab646 Mon Sep 17 00:00:00 2001 From: liuqinglin Date: Tue, 30 Jul 2024 16:14:56 +0800 Subject: [PATCH] update macos init sh --- prepare.php | 6 +++++- sapi/quickstart/macos/macos-init.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/prepare.php b/prepare.php index c3501151a3..2d35b78300 100755 --- a/prepare.php +++ b/prepare.php @@ -43,7 +43,11 @@ if ($p->isMacos()) { $p->setExtraLdflags('-undefined dynamic_lookup'); if (is_file('/usr/local/opt/llvm/bin/ld64.lld')) { - $p->withBinPath('/usr/local/opt/llvm/bin')->setLinker('ld64.lld'); + $p->withBinPath('/usr/local/opt/llvm/bin') + ->withBinPath('/opt/homebrew/opt/flex/bin') + ->withBinPath('/opt/homebrew/opt/bison/bin') + ->withBinPath('/opt/homebrew/opt/libtool/bin') + ->withBinPath('/opt/homebrew/opt/m4/bin')->setLinker('ld64.lld'); } else { $p->setLinker('lld'); } diff --git a/sapi/quickstart/macos/macos-init.sh b/sapi/quickstart/macos/macos-init.sh index 99ffee1afb..b593a35cc3 100644 --- a/sapi/quickstart/macos/macos-init.sh +++ b/sapi/quickstart/macos/macos-init.sh @@ -82,7 +82,7 @@ fi # 详见: https://github.com/pyenv/pyenv/wiki/Common-build-problems#keg-only-homebrew-packages-are-forcibly-linked--added-to-path # 已安装的包 跳过安装 -PACKAGES_1=(wget curl libtool automake re2c llvm flex bison) +PACKAGES_1=(wget curl libtool automake re2c llvm flex bison m4) PACKAGES_2=(libtool gettext coreutils libunistring pkg-config cmake) PACKAGES=("${PACKAGES_1[@]}" "${PACKAGES_2[@]}")