Skip to content
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

Merged
merged 1 commit into from
May 7, 2021
Merged

rename LLVM target for RustyHermit #84930

merged 1 commit into from
May 7, 2021

Conversation

stlankes
Copy link
Contributor

@stlankes stlankes commented May 4, 2021

  • RustyHermit is a library operating system, where the user-
    and the kernel-space use the same target
  • by a mistake a previous patch changes the target to an incorect value
  • this merge request revert the previous changes

@rust-highfive
Copy link
Collaborator

r? @varkor

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 4, 2021
@nagisa
Copy link
Member

nagisa commented May 5, 2021

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?

@nagisa
Copy link
Member

nagisa commented May 5, 2021

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned varkor May 5, 2021
@stlankes
Copy link
Contributor Author

stlankes commented May 5, 2021

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.

@nagisa
Copy link
Member

nagisa commented May 7, 2021

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 @bors r=nagisa once that's done)

@bors
Copy link
Contributor

bors commented May 7, 2021

✌️ @stlankes can now approve this pull request

@bors

This comment has been minimized.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 7, 2021
@nagisa

This comment has been minimized.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 7, 2021
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>
@stlankes
Copy link
Contributor Author

stlankes commented May 7, 2021

I revise the commit message. Thanks for your support!

@nagisa
Copy link
Member

nagisa commented May 7, 2021

@bors r+

@bors
Copy link
Contributor

bors commented May 7, 2021

📌 Commit 76f884a has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 7, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request May 7, 2021
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
@bors bors merged commit cea6e4d into rust-lang:master May 7, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants