Skip to content

risc-v build error #3

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

Closed
451846939 opened this issue Apr 2, 2025 · 2 comments
Closed

risc-v build error #3

451846939 opened this issue Apr 2, 2025 · 2 comments

Comments

@451846939
Copy link

rust-toolchain:
[toolchain]
profile = "minimal"
channel = "nightly-2024-05-02"
components = ["rust-src", "llvm-tools", "rustfmt", "clippy"]
targets = ["x86_64-unknown-none", "riscv64gc-unknown-none-elf", "aarch64-unknown-none", "aarch64-unknown-none-softfloat"]

build error
error[E0658]: const operands for inline assembly are unstable
--> /Users/xxx/.cargo/registry/src/rsproxy.cn-0dccff568467c15b/kernel_guard-0.1.2/src/arch/riscv.rs:10:60
|
10 | unsafe { asm!("csrrc {}, sstatus, {}", out(reg) flags, const SIE_BIT) };
| ^^^^^^^^^^^^^
|
= note: see issue #93332 rust-lang/rust#93332 for more information
= help: add #![feature(asm_const)] to the crate attributes to enable
= note: this compiler was built on 2024-05-01; consider upgrading it if it is out of date

@451846939 451846939 mentioned this issue Apr 2, 2025
@equation314
Copy link
Member

It compiles fine on the latest stable toolchain (>= 1.82.0, which stabilize asm_const). If you need to use an older toolchain, you can pin the version to v0.1.1.

@451846939
Copy link
Author

Thanks, I resolved the issue by using the latest nightly version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants