mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
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`.
22 lines
863 B
TOML
22 lines
863 B
TOML
[target.x86_64-unknown-linux-gnu]
|
|
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
|
|
# system page size will be used, which may not work on the target systems.
|
|
# JEMALLOC_SYS_WITH_LG_PAGE=16 tells jemalloc to support up to 64-KiB
|
|
# pages. See: https://github.com/sigp/lighthouse/issues/5244
|
|
[build.env]
|
|
passthrough = [
|
|
"JEMALLOC_SYS_WITH_LG_PAGE",
|
|
]
|