- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Redox x86_64 target support #38366
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
Redox x86_64 target support #38366
Conversation
| Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. | 
| @bors r+ | 
| 📌 Commit dc2b3fb has been approved by  | 
| @bors r- Oh, I see this defines a redox target_family. Let's please not do that. Right now the only "families" are "windows" and "unix" and I'm not inclined to change that. | 
| Oh, this is weird. The code that sets up the value of  https://github.com/rust-lang/rust/blob/master/src/librustc/session/config.rs#L946 What I expected this code to be doing was more like: With the target specs actually defining the family used by  I think my preference is to modify the existing code to work as I described, so that  | 
| f? @rust-lang/lang my comment above about the definition of  | 
| 
 related issue: #38187 | 
| @brson I would be happy to not specify  I believe, based on the  Redox is Unix-like, but cannot be  So far I have not run into any build breaking things by having a  | 
dc2b3fb    to
    7e0519d      
    Compare
  
    | r? @brson | 
7e0519d    to
    383890b      
    Compare
  
    | A more complete change is here: #38401 | 
Redox Cross Compilation I will admit - there are things here that I wish I did not have to do. This completes the ability to create a cross compiler from the rust repository for `x86_64-unknown-redox`. I will document this PR with inline comments explaining some things. [View this gist to see how a cross compiler is built](https://gist.github.com/jackpot51/6680ad973986e84d69c79854249f2b7e) Prior discussion of a smaller change is here: #38366
This adds support for the x86_64 architecture of Redox to
rustc. This patch will generate #[no_std] executables and, following the merge of #37702, the cross compiling of the standard library will be possible.This differs from other targets in that it does not link
libc, as Redox does not have a dependency onlibc.It is possible that
libopenlibmwill be added to post_link_args for math functions in the future.