bootstrap: Disable initial-exec TLS model on powerpc#85807
bootstrap: Disable initial-exec TLS model on powerpc#85807bors merged 1 commit intorust-lang:masterfrom
Conversation
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
Please note: I have not fully tested this change yet. So please don't merge it yet although I'm sure it's correct. |
src/bootstrap/builder.rs
Outdated
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.
|
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
674e27e
Compare
This comment has been minimized.
This comment has been minimized.
674e27e to
283619c
Compare
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. |
|
@glaubitz Ping from triage, what's next steps here? |
|
@glaubitz Are you intending to add anything more to this PR, or shall I tag this for review? |
|
@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. |
@bstrie I believe this message was meant for you. |
|
Oops, sorry. Two people starting with "@b" in the thread and I just had only one coffee this morning :). |
I don't want to add anything else. Could you tag this for review? Thanks! |
|
📌 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.