Uh oh!
There was an error while loading. Please reload this page.
bootstrap: Disable initial-exec TLS model on powerpc - #85807
Conversation
rust-highfive
commented
May 29, 2021
(rust-highfive has picked a reviewer for you, use r? to override) |
glaubitz
commented
May 29, 2021
Please note: I have not fully tested this change yet. So please don't merge it yet although I'm sure it's correct. |
There was a problem hiding this comment.
Hm, I'm surprised to see cfg here at all; I'd expect this to check target.contains("powerpc") or so...
There was a problem hiding this comment.
I believe cfg would be wrong when cross-compiling - since "target" here refers to the target of bootstrap which would be the host (native) platform?
There was a problem hiding this comment.
@glaubitz try && !target.triple.startswith("powerpc-") instead
There was a problem hiding this comment.
Done. I'm testing the change now on a real PowerPC machine to see if it actually works.
There was a problem hiding this comment.
The change as suggested by @infinity0 works fine and fixes the problem on 32-bit PowerPC.
But please feel free to use a different approach if anyone has a better idea. I don't insist on my particular approach.
Aaron1011
commented
May 29, 2021
If this TLS mode is completely unsupported on powerpc, then I think we should emit an error whenver someone tries to specify it on the command line. Otherwise, anyone else using |
c4b54f3 to
674e27eCompare
This comment has been minimized.
This comment has been minimized.
674e27e to
283619cCompareglaubitz
commented
May 31, 2021
Is there some sort of feature matrix that Rust is carrying internally for every architecture where this information could be stored as a flag? I would guess this bug could affect the upcoming m68k port as well. Plus, such a feature matrix could be used to determine whether a certain test is run or not. Currently, all tests seem to be checking per architecture rather than per feature. |
This mode is an optimization hint, if an "initial-exec" hint is useless for a given target (like e.g. TLS models not generally mapping on Windows-based target), then it should be demoted to a weaker hint. |
crlf0710
commented
Jul 4, 2021
@glaubitz Ping from triage, what's next steps here? |
bstrie
commented
Jul 21, 2021
@glaubitz Are you intending to add anything more to this PR, or shall I tag this for review? |
glaubitz
commented
Jul 22, 2021
@bkaestner I don't have any strong preference, the fix works for me. Feel free to merge it as-is or replace it with a better solution. |
bkaestner
commented
Jul 22, 2021
@bstrie I believe this message was meant for you. |
glaubitz
commented
Jul 22, 2021
Oops, sorry. Two people starting with "@b" in the thread and I just had only one coffee this morning :). |
glaubitz
commented
Jul 31, 2021
I don't want to add anything else. Could you tag this for review? Thanks! |
glaubitz
commented
Aug 4, 2021
Mark-Simulacrum
commented
Aug 6, 2021
bors
commented
Aug 6, 2021
📌 Commit 283619c has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#85807 (bootstrap: Disable initial-exec TLS model on powerpc) - rust-lang#87761 (Fix overflow in rustc happening if the `err_count()` is reduced in a stage.) - rust-lang#87775 (Add hint for unresolved associated trait items if the trait has a single item) - rust-lang#87779 (Remove special case for statement `NodeId` assignment) - rust-lang#87787 (Use `C-unwind` ABI for `__rust_start_panic` in `panic_abort`) - rust-lang#87809 (Fix typo in the ptr documentation) - rust-lang#87816 (Sync rustc_codegen_cranelift) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes#81334.