-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to fully upstream Rust #209
Comments
When trying {
"arch": "riscv32",
"cpu": "generic-rv32",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-i64:64-n32-S32",
"eh-frame-header": false,
"emit-debug-gdb-scripts": false,
"features": "+e,+m,+lui-addi-fusion,+fast-unaligned-access,+xtheadcondmov",
"linker": "rust-lld",
"linker-flavor": "ld.lld",
"llvm-abiname": "ilp32e",
"llvm-target": "riscv32",
"max-atomic-width": 32,
"panic-strategy": "abort",
"relocation-model": "static",
"target-pointer-width": "32",
"singlethread": true,
"pre-link-args": {
"ld": [
"--emit-relocs",
"--relocatable",
"--unique"
]
},
"env": "athenavm"
} i'm getting:
I'm still digging into it. |
Adding
That can be fixed by using I'm still digging into it. |
Above works fine after setting |
So far:
Current plan is to add somewhere (e.g. to
like: #[cfg(target_os = "zkvm")]
#[no_mangle]
pub fn __atomic_load_4(arg: *const usize, _ordering: usize) -> usize {
unsafe { *arg }
}
#[cfg(target_os = "zkvm")]
#[no_mangle]
pub fn __atomic_load_1(arg: *const usize, _ordering: usize) -> usize {
unsafe { *arg }
} All that was tested with {
"arch": "riscv32",
"cpu": "generic-rv32",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-i64:64-n32-S32",
"eh-frame-header": false,
"emit-debug-gdb-scripts": false,
"features": "+e,+m",
"linker": "rust-lld",
"linker-flavor": "ld.lld",
"llvm-abiname": "ilp32e",
"llvm-target": "riscv32",
"max-atomic-width": 32,
"atomic-cas": true,
"executables": true,
"panic-strategy": "abort",
"relocation-model": "static",
"target-pointer-width": "32",
"singlethread": true,
"os": "zkvm",
"pre-link-args": {
"ld": [
"--emit-relocs",
"--unique"
]
},
"env": "athenavm"
} used with command: |
IIRC
|
It looks like this is now possible, and like it's time to retire https://github.com/athenavm/rustc-rv32e-toolchain
See paritytech/polkavm#178
The text was updated successfully, but these errors were encountered: