-
Notifications
You must be signed in to change notification settings - Fork 13.3k
linker: Add a linker rerun hack for gcc versions not supporting -static-pie #72708
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Conversation
This file contains 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
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
r? @cuviper |
This was referenced May 28, 2020
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
|
@bors r+ |
📌 Commit 071f042 has been approved by |
⌛ 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
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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-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 #71804 and unblocks #70740.