-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[CI][Docker] Add riscv-gnu-toolchain to ci_riscv #15403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI][Docker] Add riscv-gnu-toolchain to ci_riscv #15403
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @PhilippvK! I'll replace it with a multilib build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue here. RISC-V proxy kernel needs to be built separately for rv32gc and rv64gc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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