Skip to content

Commit

Permalink
Fix MacOS Risc-V Toolchain build
Browse files Browse the repository at this point in the history
gmake is now required (riscv-collab/riscv-gnu-toolchain@7317ccf)

This is due to the use of `undefine` in the Makefile which requires make version >=3.82 - MacOS only ships with 3.81
  • Loading branch information
will-v-pi committed Jan 8, 2025
1 parent fa2d797 commit b048080
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ arch -arm64 /opt/homebrew/bin/brew install jq libtool libusb automake hidapi --q
# RISC-V prerequisites
echo "Listing local"
ls /usr/local/bin
rm /usr/local/bin/2to3*
rm /usr/local/bin/idle3*
rm /usr/local/bin/pip*
rm /usr/local/bin/py*
arch -x86_64 /usr/local/bin/brew install python3 gawk gnu-sed gmp mpfr libmpc isl zlib expat texinfo flock libslirp --quiet
arch -arm64 /opt/homebrew/bin/brew install python3 gawk gnu-sed gmp mpfr libmpc isl zlib expat texinfo flock libslirp --quiet
rm /usr/local/bin/2to3* || true
rm /usr/local/bin/idle3* || true
rm /usr/local/bin/pip* || true
rm /usr/local/bin/py* || true
arch -x86_64 /usr/local/bin/brew install python3 gawk gnu-sed make gmp mpfr libmpc isl zlib expat texinfo flock libslirp --quiet
arch -arm64 /opt/homebrew/bin/brew install python3 gawk gnu-sed make gmp mpfr libmpc isl zlib expat texinfo flock libslirp --quiet

repos=$(cat config/repositories.json | jq -c '.repositories.[]')
export version=$(cat ./version.txt)
Expand Down
2 changes: 1 addition & 1 deletion packages/macos/riscv/build-riscv-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export GDB_TARGET_FLAGS_EXTRA
cd riscv-gnu-toolchain
./configure --prefix=$BUILDDIR/$INSTALLDIR --with-arch=rv32ima_zicsr_zifencei_zba_zbb_zbs_zbkb_zca_zcb --with-abi=ilp32 --with-multilib-generator="rv32ima_zicsr_zifencei_zba_zbb_zbs_zbkb_zca_zcb-ilp32--;rv32imac_zicsr_zifencei_zba_zbb_zbs_zbkb-ilp32--" --with-gcc-src=$BUILDDIR/gcc
# 4 threads, as 8 threads runs out of memory
make -j4
gmake -j4

# Make x64 and Windows toolchains, by copying multilib into existing toolchains
cd ..
Expand Down

0 comments on commit b048080

Please sign in to comment.