Skip to content

cross compile riscv64 with LLVM toolchain and sysroot#1116

Open
jjhelmus wants to merge 1 commit intoastral-sh:mainfrom
jjhelmus:llvm-toolchain-riscv
Open

cross compile riscv64 with LLVM toolchain and sysroot#1116
jjhelmus wants to merge 1 commit intoastral-sh:mainfrom
jjhelmus:llvm-toolchain-riscv

Conversation

@jjhelmus
Copy link
Copy Markdown
Contributor

@jjhelmus jjhelmus commented May 1, 2026

Use the same LLVM toolchain that is used for native x86-64 builds to cross compile for riscv64 using a sysroot.

Use the same LLVM toolchain that is used for native x86-64 builds to
cross compile for riscv64 using a sysroot.
@jjhelmus jjhelmus added arch:riscv64 python:all Select all Python versions build:all labels May 1, 2026
@jjhelmus
Copy link
Copy Markdown
Contributor Author

jjhelmus commented May 1, 2026

This differs in the approach in #1101 in that the LLVM toolchain is coming from the "custom compiled toolchain" (the llvm-x86_64-linux download target) that is also used to build the x86-64 targets. #1101 uses the toolchain provided by the LLVM project itself. This approach is more reproducible as the toolchain is pinned to a specific version and source.

@jjhelmus
Copy link
Copy Markdown
Contributor Author

jjhelmus commented May 1, 2026

Only the libc6-dev-riscv64-cross and libgcc-8-dev-riscv64-cross packages are needed for the sysroot, the others are dependencies of these but are included for clarity.

@jjhelmus jjhelmus requested a review from EliteTK May 8, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch:riscv64 build:all python:all Select all Python versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants