[CI][Docker] Add riscv-gnu-toolchain to ci_riscv#15403
[CI][Docker] Add riscv-gnu-toolchain to ci_riscv#15403katebern-grovety wants to merge 3 commits intoapache:mainfrom
Conversation
Currently the ci_riscv docker image uses GNU toolchain for Xuantie RISC-V CPU, which does not contain V-extension instructions. This PR adds GNU toolchain for RISC-V from RISC-V Collaboration.
|
cc @Mousius, @areusch, @leandron, @PhilippvK, @alter-xp |
| TMPDIR=$(mktemp -d) | ||
| RISCV_GCC_EXT="tar.gz" | ||
| RLS_TAG="2023.07.07" | ||
| RISCV_GCC_URL="https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/${RLS_TAG}/riscv64-glibc-ubuntu-22.04-gcc-nightly-${RLS_TAG}-nightly.${RISCV_GCC_EXT}" |
There was a problem hiding this comment.
In contrast to the Xuantie GCC, this is a non-multilib build of the RISC-V GNU Toolchain. Support is probably limited to rv64gc/lp64d.
In the long term, we should find a way to support riscv32 and riscv64 (eventually, with different levels of floating-point support).
There was a problem hiding this comment.
Thanks @PhilippvK! I'll replace it with a multilib build.
There was a problem hiding this comment.
Do you have an guess on how long the from source build will take? I am not sure If this would be acceptable… Maybe there is a multilib build available to use here: https://github.com/sifive/freedom-tools/releases
There was a problem hiding this comment.
I guess it will take a few hours, by the link you specified there are builds from two years ago. As a solution, I can publish a release in forked riscv-gnu-toolchain repository.
| ../configure --prefix=`pwd`/install --host=riscv64-unknown-linux-gnu | ||
| make -j`nproc` | ||
| make install | ||
| cp ./pk $INSTALLATION_PATH/bin/pk |
There was a problem hiding this comment.
Same issue here. RISC-V proxy kernel needs to be built separately for rv32gc and rv64gc.
There was a problem hiding this comment.
I'll add build for rv32gc and rv64gc.
|
The RISC-V GCC is only supposed to be used for linking and providing the |
Yes, RISC-V GCC is used for linking and providing libs. |
Build from source multilib RISC-V GNU toolchain Add builds rv32gc and rv64gc for RISC-V Proxy Kernel Fix Spike version
|
The current version of Xuantie GCC supports V-extension. However, as I mentioned in the PR, is it syntactically correct to directly use |
But on the current version of the toolchain, the error Instead of |
Currently the ci_riscv docker image uses GNU toolchain for Xuantie RISC-V CPU, which does not contain V-extension instructions. This PR adds GNU toolchain for RISC-V from RISC-V Collaboration. This update is required for the PR