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

Add builtin targets for mips64(el)-unknown-linux-muslabi64 #63165

Merged
merged 1 commit into from
Aug 15, 2019

Conversation

xen0n
Copy link
Contributor

@xen0n xen0n commented Jul 31, 2019

This is prerequisite for rust-lang/libc#1449.

Tested locally to produce working static and dynamic binaries, but CI config is untested for now CI is to be added in a follow-up PR.

edit: dynamic binaries also confirmed working!

edit 2: changed triples to include ABI, and removed stray crt_static_default = false declarations to be consistent with other musl targets

@rust-highfive
Copy link
Collaborator

r? @eddyb

(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 Jul 31, 2019
@xen0n xen0n changed the title [WIP] Add MIPS64 musl targets Add builtin targets for mips64(el)-unknown-linux-musl Aug 9, 2019
@xen0n xen0n marked this pull request as ready for review August 9, 2019 12:00
@xen0n
Copy link
Contributor Author

xen0n commented Aug 9, 2019

This is ready for review, for unblocking the libc changes.

@xen0n
Copy link
Contributor Author

xen0n commented Aug 9, 2019

r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned eddyb Aug 9, 2019
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 9, 2019

📌 Commit e1bd8cb has been approved by alexcrichton

@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 Aug 9, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 9, 2019
…ichton

Add builtin targets for mips64(el)-unknown-linux-musl

This is prerequisite for rust-lang/libc#1449.

Tested locally to produce working static and dynamic binaries, ~~but CI config is untested for now~~ CI is to be added in a follow-up PR.

*edit: dynamic binaries also confirmed working!*
@Centril Centril added relnotes Marks issues that should be documented in the release notes of the next release. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 9, 2019
@Centril Centril added this to the 1.38 milestone Aug 9, 2019
@bors
Copy link
Contributor

bors commented Aug 9, 2019

⌛ Testing commit e1bd8cb with merge 0329c99a420dfdb7914c64875fbdc4c1b892e301...

@bors
Copy link
Contributor

bors commented Aug 9, 2019

💔 Test failed - checks-azure

@rust-highfive
Copy link
Collaborator

The job dist-x86_64-musl of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-09T18:58:18.5153259Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-09T18:58:18.5153308Z 
2019-08-09T18:58:18.5153547Z   git checkout -b <new-branch-name>
2019-08-09T18:58:18.5153603Z 
2019-08-09T18:58:18.5153892Z HEAD is now at 0329c99a4 Auto merge of #63165 - xen0n:mips64-musl-targets, r=alexcrichton
2019-08-09T18:58:18.5313819Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-09T18:58:18.5316707Z ==============================================================================
2019-08-09T18:58:18.5316810Z Task         : Bash
2019-08-09T18:58:18.5316876Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-09T21:07:40.0677910Z     Finished release [optimized] target(s) in 5m 20s
2019-08-09T21:07:40.0840987Z [TIMING] ToolBuild { compiler: Compiler { stage: 1, host: "x86_64-unknown-linux-musl" }, target: "x86_64-unknown-linux-musl", tool: "rls", path: "src/tools/rls", mode: ToolRustc, is_optional_tool: true, source_type: Submodule, extra_features: ["clippy"] } -- 320.848
2019-08-09T21:07:59.0686344Z 
2019-08-09T21:07:59.0688007Z 
2019-08-09T21:07:59.0689732Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-musl/stage0-tools-bin/fabricate" "generate" "--product-name=Rust" "--rel-manifest-dir=rustlib" "--success-message=RLS-ready-to-serve." "--image-dir" "/checkout/obj/build/tmp/dist/rls-image" "--work-dir" "/checkout/obj/build/tmp/dist" "--output-dir" "/checkout/obj/build/dist" "--non-installed-overlay" "/checkout/obj/build/tmp/dist/rls-overlay" "--package-name=rls-nightly-x86_64-unknown-linux-musl" "--legacy-manifest-dirs=rustlib,cargo" "--component-name=rls-preview"
2019-08-09T21:07:59.0690489Z expected success, got: signal: 11
2019-08-09T21:07:59.0690903Z 
2019-08-09T21:07:59.0693928Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --build x86_64-unknown-linux-musl
2019-08-09T21:07:59.0694383Z Build completed unsuccessfully in 2:01:25
2019-08-09T21:07:59.0694383Z Build completed unsuccessfully in 2:01:25
2019-08-09T21:08:02.7663572Z ##[error]Bash exited with code '1'.
2019-08-09T21:08:02.7699022Z ##[section]Starting: Upload CPU usage statistics
2019-08-09T21:08:02.7710334Z ==============================================================================
2019-08-09T21:08:02.7710447Z Task         : Bash
2019-08-09T21:08:02.7710518Z Description  : Run a Bash script on macOS, Linux, or Windows

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 9, 2019
@alexcrichton
Copy link
Member

@bors: retry

@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 Aug 9, 2019
Hard-float (unlike mips32 musl targets but consistent with any other
musl target), MIPS64r2, n64 ABI.

The triples are renamed to carry the `abi64` ABI suffix found on all
other MIPS64 targets, for consistency and forward compatibility, should
Rust gain support for the n32 ABI one day.
@Centril Centril removed the relnotes Marks issues that should be documented in the release notes of the next release. label Aug 13, 2019
@Centril Centril removed this from the 1.38 milestone Aug 13, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019
…ichton

Add builtin targets for mips64(el)-unknown-linux-muslabi64

This is prerequisite for rust-lang/libc#1449.

Tested locally to produce working static and dynamic binaries, ~~but CI config is untested for now~~ CI is to be added in a follow-up PR.

*edit: dynamic binaries also confirmed working!*

*edit 2: changed triples to include ABI, and removed stray `crt_static_default = false` declarations to be consistent with other musl targets*
Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019
…ichton

Add builtin targets for mips64(el)-unknown-linux-muslabi64

This is prerequisite for rust-lang/libc#1449.

Tested locally to produce working static and dynamic binaries, ~~but CI config is untested for now~~ CI is to be added in a follow-up PR.

*edit: dynamic binaries also confirmed working!*

*edit 2: changed triples to include ABI, and removed stray `crt_static_default = false` declarations to be consistent with other musl targets*
Centril added a commit to Centril/rust that referenced this pull request Aug 15, 2019
…ichton

Add builtin targets for mips64(el)-unknown-linux-muslabi64

This is prerequisite for rust-lang/libc#1449.

Tested locally to produce working static and dynamic binaries, ~~but CI config is untested for now~~ CI is to be added in a follow-up PR.

*edit: dynamic binaries also confirmed working!*

*edit 2: changed triples to include ABI, and removed stray `crt_static_default = false` declarations to be consistent with other musl targets*
bors added a commit that referenced this pull request Aug 15, 2019
Rollup of 9 pull requests

Successful merges:

 - #63155 (Add UWP MSVC targets)
 - #63165 (Add builtin targets for mips64(el)-unknown-linux-muslabi64)
 - #63306 (Adapt AddRetag for shallow retagging)
 - #63467 (Add Catalyst (iOS apps running on macOS) target)
 - #63546 (Remove uses of `mem::uninitialized()` from cloudabi)
 - #63572 (remove unused Level::PhaseFatal)
 - #63577 (Test HRTB issue accepted by compiler)
 - #63582 (Fix ICE #63226)
 - #63586 (cleanup: Remove `Spanned` where possible)

Failed merges:

r? @ghost
@bors bors merged commit 30fcd50 into rust-lang:master Aug 15, 2019
@bors
Copy link
Contributor

bors commented Aug 15, 2019

⌛ Testing commit 30fcd50 with merge f7af19c...

@bors
Copy link
Contributor

bors commented Aug 15, 2019

☔ The latest upstream changes (presumably #63592) made this pull request unmergeable. Please resolve the merge conflicts.

@xen0n xen0n deleted the mips64-musl-targets branch August 15, 2019 16:32
@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 Aug 15, 2019
@pietroalbini
Copy link
Member

@bors retry r-

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

smaeul commented Sep 7, 2019


EDIT: Ignore me (see the next comment).


@xen0n The default ABI for an architecture shouldn't have a suffix, and the names for alternative ABIs are generally standardized by the architecture vendor.

32-bit ARM targets have an eabi suffix to their environment only for unfortunate historical reasons: because the ARM EABI, or "embedded" ABI was so much better than the original ARM ABI, everyone stopped using the old ARM ABI. The EABI became the only/default ABI several years later.

For MIPS64 targets, the 64-bit ABI with hard float is the default. So these two targets should have been named

mips64-unknown-linux-musl
mips64el-unknown-linux-musl

like they were originally. @alexcrichton, I'm guessing this is impossible to fix now? Or could this still be fixed since rust-lang/libc#1449 was merged after the latest release?

For completeness, the other possibilities would be:

mips64-unknown-linux-musln32
mips64-unknown-linux-musln32sf
mips64el-unknown-linux-musln32
mips64el-unknown-linux-musln32sf

@smaeul
Copy link
Contributor

smaeul commented Sep 7, 2019

Sorry, MIPS ABI selection is more of a mess than I realized. The gnuabi64 and gnuabin32 environments appear to be Debianisms. In clang/LLVM, mips64-unknown-linux-gnu and mips64-unknown-linux-gnuabi64 are exact aliases of each other. The only reference to abi64 in gcc is in the context of Debian-style multiarch.

In vanilla gcc, the triple is not parsed to determine the ABI. It simply defaults to n32. However, in musl-cross-make, the "blessed" tool for making musl-targeting toolchains, mips64-unknown-linux-musl means --with-abi=64.

Presumably this sort of confusion is what led Debian to start adding the abi64 suffix. So while I don't think the abi64 suffix is strictly necessary, since it's the default in LLVM and any musl-targeting gcc, it's not wrong, and the rust triple is fine as-is.

@alexcrichton
Copy link
Member

Targets aren't really set in stone and have been renamed from time to time. It basically just involves asking the community of those using the targets if they agree with the rename.

Centril added a commit to Centril/rust that referenced this pull request Oct 29, 2019
…r=alexcrichton

Enable dist for MIPS64 musl targets

Continuing work in rust-lang#63165, necessary libc changes are in place and published so here we go!
tmandry added a commit to tmandry/rust that referenced this pull request Oct 29, 2019
…r=alexcrichton

Enable dist for MIPS64 musl targets

Continuing work in rust-lang#63165, necessary libc changes are in place and published so here we go!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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