cibuild.sh: Using GCC from xPack for riscv

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2023-09-19 14:13:42 +08:00 committed by Petro Karashchenko
parent 3cd5e20f74
commit 7d3f11af1f

View File

@ -324,26 +324,26 @@ function python-tools {
} }
function riscv-gcc-toolchain { function riscv-gcc-toolchain {
add_path "${tools}"/riscv64-unknown-elf-gcc/bin add_path "${tools}"/riscv-none-elf-gcc/bin
if [ ! -f "${tools}/riscv64-unknown-elf-gcc/bin/riscv64-unknown-elf-gcc" ]; then if [ ! -f "${tools}/riscv-none-elf-gcc/bin/riscv-none-elf-gcc" ]; then
local flavor local flavor
case ${os} in case ${os} in
Darwin) Darwin)
flavor=x86_64-apple-darwin flavor=darwin-x64
;; ;;
Linux) Linux)
flavor=x86_64-linux-ubuntu14 flavor=linux-x64
;; ;;
esac esac
cd "${tools}" cd "${tools}"
wget --quiet https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor}.tar.gz wget --quiet https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v12.3.0-1/xpack-riscv-none-elf-gcc-12.3.0-1-${flavor}.tar.gz
tar zxf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor}.tar.gz tar zxf xpack-riscv-none-elf-gcc-12.3.0-1-${flavor}.tar.gz
mv riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor} riscv64-unknown-elf-gcc mv xpack-riscv-none-elf-gcc-12.3.0-1 riscv-none-elf-gcc
rm riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor}.tar.gz rm xpack-riscv-none-elf-gcc-12.3.0-1-${flavor}.tar.gz
fi fi
command riscv64-unknown-elf-gcc --version command riscv-none-elf-gcc --version
} }
function rust { function rust {