-
Notifications
You must be signed in to change notification settings - Fork 13k
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
rename LLVM target for RustyHermit #84930
Conversation
r? @varkor (rust-highfive has picked a reviewer for you, use r? to override) |
Can you please elaborate more on the “why”? Why does it need to be this specific LLVM target? Why was it a mistake to change it to something else previously? |
r? @nagisa |
RustyHermit ist is a library operating system. In this case, we link a static library as kernel to the application. The final result is a bootable application. The library and the application have to use the same target. Currently, the targets are different (see https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs). We need this spec to disable the usage of FPU registers, which are not allowed in kernel space. In contrast to Linux, everything is running in ring 0 and also in the same address space. |
Can you put this explanation in the PR description and/or commit message so that it ends up in the git history? r=me once that's done. @bors delegate=stlankes (comment |
✌️ @stlankes can now approve this pull request |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
RustyHermit ist is a library operating system. In this case, we link a static library as kernel to the application. The final result is a bootable application. The library and the application have to use the same target. Currently, the targets are different (see also https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs). Consequently, this commit change the LLVM target to 'hermit'. This kernel spec is needed to disable the usage of FPU registers, which are not allowed in kernel space. In contrast to Linux, everything is running in ring 0 and also in the same address space. Signed-off-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
I revise the commit message. Thanks for your support! |
@bors r+ |
📌 Commit 76f884a has been approved by |
Rollup of 9 pull requests Successful merges: - rust-lang#84254 (illumos should put libc last in library search order) - rust-lang#84442 (Unify rustc and rustdoc parsing of `cfg()`) - rust-lang#84655 (Cleanup of `wasm`) - rust-lang#84866 (linker: Avoid library duplication with `/WHOLEARCHIVE`) - rust-lang#84930 (rename LLVM target for RustyHermit) - rust-lang#84991 (rustc: Support Rust-specific features in -Ctarget-feature) - rust-lang#85029 (SGX mutex is movable) - rust-lang#85030 (Rearrange SGX split module files) - rust-lang#85033 (some further small cleanups) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
and the kernel-space use the same target