clone from here: https://github.com/riscv-collab/riscv-gnu-toolchain/

deps to install:

autoconf command:

./configure --prefix=/Volumes/case-sensitive/opt/riscv --with-arch=rv64gc --with-abi=lp64d

manual patches: