linker: Add a linker rerun hack for gcc versions not supporting -static-pie#72708
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 7, 2020
Merged
linker: Add a linker rerun hack for gcc versions not supporting -static-pie#72708bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
r? @cuviper |
This was referenced May 28, 2020
Contributor
|
cmd.env_remove("LANG");
cmd.env_remove("LC_MESSAGES");
cmd.env_remove("LC_ALL");
... sorry.. didn't see rust/src/librustc_codegen_ssa/back/link.rs Line 481 in 071f042 |
Member
|
@bors r+ |
Collaborator
|
📌 Commit 071f042 has been approved by |
Collaborator
|
⌛ Testing commit 071f042 with merge a7f7469ecbb747fe8bd78de5cf3b38d7e01d0a65... |
|
@bors retry yield |
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Jun 6, 2020
linker: Add a linker rerun hack for gcc versions not supporting -static-pie Which mirrors the existing `-no-pie` linker rerun hack, but the logic is a bit more elaborated in this case. If the linker (gcc or clang) errors on `-static-pie` we rerun in with `-static` instead. We must also replace CRT objects corresponding to `-static-pie` with ones corresponding to `-static` in this case. (One sanity check for CRT objects in target specs is also added as a drive-by fix.) To do in the future: refactor all linker rerun hacks into separate functions and share more code with `add_(pre,post)_link_objects`. This PR accompanies rust-lang#71804 and unblocks rust-lang#70740.
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Jun 6, 2020
linker: Add a linker rerun hack for gcc versions not supporting -static-pie Which mirrors the existing `-no-pie` linker rerun hack, but the logic is a bit more elaborated in this case. If the linker (gcc or clang) errors on `-static-pie` we rerun in with `-static` instead. We must also replace CRT objects corresponding to `-static-pie` with ones corresponding to `-static` in this case. (One sanity check for CRT objects in target specs is also added as a drive-by fix.) To do in the future: refactor all linker rerun hacks into separate functions and share more code with `add_(pre,post)_link_objects`. This PR accompanies rust-lang#71804 and unblocks rust-lang#70740.
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Jun 6, 2020
linker: Add a linker rerun hack for gcc versions not supporting -static-pie Which mirrors the existing `-no-pie` linker rerun hack, but the logic is a bit more elaborated in this case. If the linker (gcc or clang) errors on `-static-pie` we rerun in with `-static` instead. We must also replace CRT objects corresponding to `-static-pie` with ones corresponding to `-static` in this case. (One sanity check for CRT objects in target specs is also added as a drive-by fix.) To do in the future: refactor all linker rerun hacks into separate functions and share more code with `add_(pre,post)_link_objects`. This PR accompanies rust-lang#71804 and unblocks rust-lang#70740.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 6, 2020
Rollup of 3 pull requests Successful merges: - rust-lang#71796 (de-promote Duration::from_secs) - rust-lang#72508 (Make `PolyTraitRef::self_ty` return `Binder<Ty>`) - rust-lang#72708 (linker: Add a linker rerun hack for gcc versions not supporting -static-pie) Failed merges: r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which mirrors the existing
-no-pielinker rerun hack, but the logic is a bit more elaborated in this case.If the linker (gcc or clang) errors on
-static-piewe rerun in with-staticinstead.We must also replace CRT objects corresponding to
-static-piewith ones corresponding to-staticin this case.(One sanity check for CRT objects in target specs is also added as a drive-by fix.)
To do in the future: refactor all linker rerun hacks into separate functions and share more code with
add_(pre,post)_link_objects.This PR accompanies #71804 and unblocks #70740.