/[packages]/cauldron/rust/current/SOURCES/rustc-1.57.0-no-default-pie.patch
ViewVC logotype

Contents of /cauldron/rust/current/SOURCES/rustc-1.57.0-no-default-pie.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1766230 - (show annotations) (download)
Sun Jan 2 20:49:42 2022 UTC (2 years, 3 months ago) by akien
File size: 1445 byte(s)
- Sync with Fedora: Thu Dec 02 2021 Josh Stone <jistone@redhat.com> - 1.57.0-1
  o Update to 1.57.0, fixes rhbz#2028675.
  o Backport rust#91070, fixes rhbz#1990657
  o Add rust-std-static-wasm32-wasi 
- Mageia: Use bundled libgit2 until we have 1.3.0.

1 --- rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2021-11-29 10:41:02.380100917 -0800
2 +++ rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs 2021-11-29 10:53:31.014783112 -0800
3 @@ -1485,15 +1485,14 @@
4 }
5
6 fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind {
7 - let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) {
8 + // Only use PIE if explicity specified.
9 + let explicit_pic =
10 + matches!(sess.opts.cg.relocation_model, Some(RelocModel::Pic | RelocModel::Pie));
11 + let kind = match (crate_type, sess.crt_static(Some(crate_type)), explicit_pic) {
12 (CrateType::Executable, _, _) if sess.is_wasi_reactor() => LinkOutputKind::WasiReactorExe,
13 - (CrateType::Executable, false, RelocModel::Pic | RelocModel::Pie) => {
14 - LinkOutputKind::DynamicPicExe
15 - }
16 + (CrateType::Executable, false, true) => LinkOutputKind::DynamicPicExe,
17 (CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe,
18 - (CrateType::Executable, true, RelocModel::Pic | RelocModel::Pie) => {
19 - LinkOutputKind::StaticPicExe
20 - }
21 + (CrateType::Executable, true, true) => LinkOutputKind::StaticPicExe,
22 (CrateType::Executable, true, _) => LinkOutputKind::StaticNoPicExe,
23 (_, true, _) => LinkOutputKind::StaticDylib,
24 (_, false, _) => LinkOutputKind::DynamicDylib,

  ViewVC Help
Powered by ViewVC 1.1.30