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

added support for GNU/Hurd on x86_64 #128345

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

sthibaul
Copy link
Contributor

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Jul 29, 2024

r? @fmease

rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 29, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 29, 2024

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in src/doc/rustc/src/platform-support

cc @Nilstrieb

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 29, 2024
@sthibaul
Copy link
Contributor Author

Concerning the Tier 3 target policy, the answers are essentially the same as on #115230 : I'll be maintainer, the triplet is the same as in llvm: x86_64-unknown-hurd-gnu, this is essentially the 64bit version of the existing i686-unknown-hurd-gnu target.

@sthibaul
Copy link
Contributor Author

Is anything missing on this?

@Urgau
Copy link
Member

Urgau commented Sep 4, 2024

@sthibaul Since there wasn't a MCP for adding this target (not required for Tier 3) and #115230 (comment) was strictly speaking only for i686-unknown-hurd-gnu, I think this at least requires a new Tier 3 target policy fill out, even if it's mostly copy-pasted from the other one. It would great if you could post one.

@rustbot author
r? @Urgau

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2024
@rustbot rustbot assigned Urgau and unassigned fmease Sep 4, 2024
@sthibaul
Copy link
Contributor Author

sthibaul commented Sep 4, 2024

Ok, here it is:

Tier 3 target policy

A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.)

We added myself as target maintainer.

Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target.

We used the same target named as used in llvm: x86_64-unknown-hurd-gnu

Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it.

GNU tools use x86_64-unknown-gnu and that indeed sometimes bring confusion, that's why we used the llvm triplet.

If possible, use only letters, numbers, dashes and underscores for the name. Periods (.) are known to cause issues in Cargo.

That's alright here.

Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous
legal terms for the Rust project or for Rust developers or users.

The target legal terms are basically like the Linux ecosystem.

The target must not introduce license incompatibilities.
Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0).

Agreed.

The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy.

GNU/Hurd uses the GNU toolchain, like Linux.

Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries.

The whole point of the GNU project is exactly that :)

Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3.

This is the same situation as linux, since we use the GNU toolchain and libc.

Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party.

That is also the kind of goals of the GNU project :)

Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality),

We do have core/alloc/std.

The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary.

The documentation was added. Running tests can be done in a qemu VM for instance, pre-built installed images are available.

Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via @) to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages.

Ok, sure!

Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target,

We believe our additions didn't break anything, and we will watch CI anyway.

and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.

Sure!

If a tier 3 target stops meeting these requirements, or the target maintainers no longer have interest or time, or the target shows no signs of activity and has not built for some time, or removing the target would improve the quality of the Rust codebase, we may post a PR to remove it; any such PR will be CCed to the target maintainers (and potentially other people who have previously worked on the target), to check potential interest in improving the situation.

Ok!

@sthibaul
Copy link
Contributor Author

sthibaul commented Sep 4, 2024

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 4, 2024
@Urgau
Copy link
Member

Urgau commented Sep 4, 2024

I'm not a GNU/Hurd user but the target spec looks reasonable to me (it's very similar to it's linux counterpart anyway).

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 4, 2024

📌 Commit 1ab0e6c has been approved by Urgau

It is now in the queue for this repository.

@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 Sep 4, 2024
tgross35 added a commit to tgross35/rust that referenced this pull request Sep 5, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 6, 2024
@workingjubilee
Copy link
Member

workingjubilee commented Sep 6, 2024

Sorry, this needs a rebase on latest, failed in #130007

@bors r-

@workingjubilee
Copy link
Member

@bors r-

@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 Sep 6, 2024
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 8, 2024
@rust-log-analyzer

This comment has been minimized.

@sthibaul
Copy link
Contributor Author

sthibaul commented Sep 8, 2024

Ah, sorry, I had assumed that a mingw profile build would have been unrelated. I see, now fixed.

@workingjubilee
Copy link
Member

@sthibaul Ah, mingw-check happens to, for various reasons, fail first if anything is generally incorrect with the Rust source. In this case you simply slid behind a commit that made applying the diff not pass anymore (because it applied a lint that your code didn't pass).

@workingjubilee
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 9, 2024

📌 Commit 7626015 has been approved by workingjubilee

It is now in the queue for this repository.

@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 Sep 9, 2024
@workingjubilee
Copy link
Member

Hrm,
@bors r-

@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 Sep 9, 2024
@workingjubilee
Copy link
Member

@bors r=Urgau

@bors
Copy link
Contributor

bors commented Sep 9, 2024

📌 Commit 7626015 has been approved by Urgau

It is now in the queue for this repository.

@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 Sep 9, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 9, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Sep 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 9, 2024
…kingjubilee

Rollup of 16 pull requests

Successful merges:

 - rust-lang#119229 (Update mingw-w64 + GNU toolchain)
 - rust-lang#128345 (added support for GNU/Hurd on x86_64)
 - rust-lang#128667 (rustdoc: normalise type/field names)
 - rust-lang#128939 (Distribute rustc_codegen_cranelift for Windows)
 - rust-lang#129529 (Add test to build crates used by r-a on stable)
 - rust-lang#129624 (Adjust `memchr` pinning and run `cargo update`)
 - rust-lang#129876 (Use sysroot crates maximally in `rustc_codegen_gcc`.)
 - rust-lang#130034 ( Fix enabling wasm-component-ld to match other tools )
 - rust-lang#130048 (run-make-support: Add llvm-pdbutil)
 - rust-lang#130068 (Test codegen when setting deployment target)
 - rust-lang#130070 (Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowRegion`)
 - rust-lang#130087 (remove 'const' from 'Option::iter')
 - rust-lang#130090 (make Result::copied unstably const)
 - rust-lang#130092 (Fixes typo in wasm32-wasip2 doc comment)
 - rust-lang#130107 (const: make ptr.is_null() stop execution on ambiguity)
 - rust-lang#130115 (Remove needless returns detected by clippy in libraries)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 9, 2024
…kingjubilee

Rollup of 14 pull requests

Successful merges:

 - rust-lang#119229 (Update mingw-w64 + GNU toolchain)
 - rust-lang#128345 (added support for GNU/Hurd on x86_64)
 - rust-lang#128667 (rustdoc: normalise type/field names)
 - rust-lang#129876 (Use sysroot crates maximally in `rustc_codegen_gcc`.)
 - rust-lang#130034 ( Fix enabling wasm-component-ld to match other tools )
 - rust-lang#130048 (run-make-support: Add llvm-pdbutil)
 - rust-lang#130068 (Test codegen when setting deployment target)
 - rust-lang#130070 (Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowRegion`)
 - rust-lang#130087 (remove 'const' from 'Option::iter')
 - rust-lang#130090 (make Result::copied unstably const)
 - rust-lang#130092 (Fixes typo in wasm32-wasip2 doc comment)
 - rust-lang#130107 (const: make ptr.is_null() stop execution on ambiguity)
 - rust-lang#130115 (Remove needless returns detected by clippy in libraries)
 - rust-lang#130130 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2cce01e into rust-lang:master Sep 9, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 9, 2024
Rollup merge of rust-lang#128345 - sthibaul:hurd-amd64, r=Urgau

added support for GNU/Hurd on x86_64
@cuviper cuviper added the relnotes Marks issues that should be documented in the release notes of the next release. label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants