-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
linker: Add a linker rerun hack for gcc versions not supporting -static-pie #72708
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
r? @cuviper |
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 |
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.
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.
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.
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
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.