Skip to content

ci: add riscv64gc-unknown-linux-gnu to release artifacts#2464

Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom
gounthar:riscv64-release
Mar 12, 2026
Merged

ci: add riscv64gc-unknown-linux-gnu to release artifacts#2464
alexcrichton merged 2 commits intobytecodealliance:mainfrom
gounthar:riscv64-release

Conversation

@gounthar
Copy link
Contributor

@gounthar gounthar commented Mar 12, 2026

This adds riscv64gc-unknown-linux-gnu to the release build matrix, so that official releases ship a pre-built Linux/RISC-V 64-bit binary.

Changes

  • ci/docker/riscv64-linux/Dockerfile : new cross-compilation container (modeled on the existing aarch64-linux one, using gcc-riscv64-linux-gnu)
  • .github/workflows/main.yml : new riscv64-linux matrix entry in the build job

Evidence

A fork release built with this exact configuration is available at https://github.com/gounthar/wasm-tools/releases/tag/v1.245.1 ; the wasm-tools-1.245.1-riscv64gc-unknown-linux-gnu.tar.gz artifact was verified on physical RISC-V hardware (BananaPi BPI-F3, SpacemiT K1).

Fixes #2463

@gounthar gounthar requested a review from a team as a code owner March 12, 2026 15:10
@gounthar gounthar requested review from pchickey and removed request for a team March 12, 2026 15:10
gcc-riscv64-linux-gnu is not available in Ubuntu 16.04 (Xenial).
Use 18.04 (Bionic) which ships the riscv64 cross-compiler.
This is acceptable because RISC-V Linux distributions all ship
glibc >= 2.27 (the 18.04 version).
@gounthar
Copy link
Contributor Author

gounthar commented Mar 12, 2026

Note on the Ubuntu 18.04 base image: The existing Dockerfiles use Ubuntu 16.04 (Xenial) to minimize the glibc version requirement for the produced binaries. However, gcc-riscv64-linux-gnu was first packaged in Ubuntu 18.04 (Bionic), so the riscv64 Dockerfile uses 18.04 instead. 🤷

This seems acceptable to me in practice because RISC-V Linux distributions all ship glibc >= 2.27 (the 18.04 version). The earliest mainstream RISC-V distros (Fedora 33 for riscv64, Debian sid/trixie, Ubuntu 20.04+) all use glibc 2.31+, so linking against glibc 2.27 imposes no real compatibility constraint.

If maintainers prefer to keep 16.04 uniformity, an alternative would be to manually add a riscv64 cross-compiler PPA or build the cross-toolchain from source, but that adds complexity for no practical benefit given the target platform landscape.

@pchickey pchickey requested review from alexcrichton and removed request for pchickey March 12, 2026 16:32
@pchickey
Copy link
Contributor

Looks OK to me but re-assigning to Alex because he has the most experience with CI and release subtleties

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexcrichton alexcrichton added this pull request to the merge queue Mar 12, 2026
Merged via the queue into bytecodealliance:main with commit c314427 Mar 12, 2026
37 checks passed
@gounthar gounthar deleted the riscv64-release branch March 12, 2026 17:36
@gounthar
Copy link
Contributor Author

Thanks @alexcrichton for the quick review and merge! Really appreciate the responsiveness. Looking forward to riscv64 binaries shipping with the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add riscv64gc-unknown-linux-gnu to release artifacts

3 participants