Enable cross-compiling for riscv64 architecture (#7346)

Lighthouse currently lacks support for cross-compilation targeting the `riscv64` architecture.


  This PR introduces initial support for cross-compiling Lighthouse to `riscv64`. The following changes were made:

- **Makefile**: Updated to support `cross` with `riscv64` as a target.
- **Cross.toml**: Added configuration specific to `riscv64`.
- **Documentation**: List 'build-riscv64' in `book/src/installation_cross_compiling.md`.
This commit is contained in:
Robert Mordzon
2025-04-24 00:31:46 +02:00
committed by GitHub
parent c13e069c9c
commit 1dd37048b9
3 changed files with 16 additions and 1 deletions

View File

@@ -4,6 +4,11 @@ pre-build = ["apt-get install -y cmake clang-5.0"]
[target.aarch64-unknown-linux-gnu]
pre-build = ["apt-get install -y cmake clang-5.0"]
[target.riscv64gc-unknown-linux-gnu]
pre-build = ["apt-get install -y cmake clang"]
# Use the most recent Cross image for RISCV because the stable 0.2.5 image doesn't work
image = "ghcr.io/cross-rs/riscv64gc-unknown-linux-gnu:main"
# Allow setting page size limits for jemalloc at build time:
# For certain architectures (like aarch64), we must compile
# jemalloc with support for large page sizes, otherwise the host's