Skip to content

cross compile with upstream LLVM and a sysroot for riscv64 - #1259

Draft
jjhelmus wants to merge 12 commits into
mainfrom
jjh/riscv-sysroot-llvm23
Draft

jjhelmus wants to merge 12 commits into
mainfrom
jjh/riscv-sysroot-llvm23

Conversation

@jjhelmus

@jjhelmus jjhelmus commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Use upstream LLVM 23 and a Debian buster sysroot to cross-compile for riscv64.

Note that this does not use llvm package that is used for other builds and instead uses a toolchain installed from apt.llvm.org. This is only for testing to see if the approach works and lld can be used for cross-linking.

Use LLVM 22 and a Debian buster sysroot to cross-compile for riscv64.
Both the native and cross linking is done by lld which is a native cross
linker.
Load the installed sysconfig data when generating PYTHON.json so cross-compilation flags and build-only paths do not leak into its configuration values.

Merge into a separate dictionary to avoid newer Python versions restoring uncleaned values when sysconfig reinitializes its cache.
@jjhelmus jjhelmus added platform:linux Specific to the Linux platform arch:riscv64 python:all Select all Python versions build:all labels Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch:riscv64 build:all platform:linux Specific to the Linux platform python:all Select all Python versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant