diff --git a/.gitignore b/.gitignore index 0831c59..96cc5a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/rustc-1.58.0-src.tar.xz +SOURCES/rustc-1.58.1-src.tar.xz SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz diff --git a/.rust.metadata b/.rust.metadata index 516c355..9adc181 100644 --- a/.rust.metadata +++ b/.rust.metadata @@ -1,2 +1,2 @@ -c57248567ade6533bd15352eba956b13b82e8c6f SOURCES/rustc-1.58.0-src.tar.xz +783cb359829e7ea508deae659837f9bb360e46c8 SOURCES/rustc-1.58.1-src.tar.xz b8865d1192852214d6d9b0a0957d4b36c16832aa SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz diff --git a/SOURCES/rustc-1.57.0-no-default-pie.patch b/SOURCES/rustc-1.57.0-no-default-pie.patch deleted file mode 100644 index c9c8693..0000000 --- a/SOURCES/rustc-1.57.0-no-default-pie.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2021-11-29 10:41:02.380100917 -0800 -+++ rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs 2021-11-29 10:53:31.014783112 -0800 -@@ -1485,15 +1485,14 @@ - } - - fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind { -- let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) { -+ // Only use PIE if explicity specified. -+ let explicit_pic = -+ matches!(sess.opts.cg.relocation_model, Some(RelocModel::Pic | RelocModel::Pie)); -+ let kind = match (crate_type, sess.crt_static(Some(crate_type)), explicit_pic) { - (CrateType::Executable, _, _) if sess.is_wasi_reactor() => LinkOutputKind::WasiReactorExe, -- (CrateType::Executable, false, RelocModel::Pic | RelocModel::Pie) => { -- LinkOutputKind::DynamicPicExe -- } -+ (CrateType::Executable, false, true) => LinkOutputKind::DynamicPicExe, - (CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe, -- (CrateType::Executable, true, RelocModel::Pic | RelocModel::Pie) => { -- LinkOutputKind::StaticPicExe -- } -+ (CrateType::Executable, true, true) => LinkOutputKind::StaticPicExe, - (CrateType::Executable, true, _) => LinkOutputKind::StaticNoPicExe, - (_, true, _) => LinkOutputKind::StaticDylib, - (_, false, _) => LinkOutputKind::DynamicDylib, diff --git a/SOURCES/rustc-1.58.0-no-default-pie.patch b/SOURCES/rustc-1.58.0-no-default-pie.patch new file mode 100644 index 0000000..67fb0c6 --- /dev/null +++ b/SOURCES/rustc-1.58.0-no-default-pie.patch @@ -0,0 +1,44 @@ +diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs +index 638b2a7b5a9f..79d4ecf4cb91 100644 +--- a/compiler/rustc_codegen_ssa/src/back/link.rs ++++ b/compiler/rustc_codegen_ssa/src/back/link.rs +@@ -763,7 +763,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>( + && cmd.get_args().iter().any(|e| e.to_string_lossy() == "-no-pie") + { + info!("linker output: {:?}", out); +- warn!("Linker does not support -no-pie command line option. Retrying without."); ++ info!("Linker does not support -no-pie command line option. Retrying without."); + for arg in cmd.take_args() { + if arg.to_string_lossy() != "-no-pie" { + cmd.arg(arg); +@@ -782,7 +782,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>( + && cmd.get_args().iter().any(|e| e.to_string_lossy() == "-static-pie") + { + info!("linker output: {:?}", out); +- warn!( ++ info!( + "Linker does not support -static-pie command line option. Retrying with -static instead." + ); + // Mirror `add_(pre,post)_link_objects` to replace CRT objects. +@@ -1507,15 +1507,14 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + } + + fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind { +- let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) { ++ // Only use PIE if explicitly specified. ++ let explicit_pic = ++ matches!(sess.opts.cg.relocation_model, Some(RelocModel::Pic | RelocModel::Pie)); ++ let kind = match (crate_type, sess.crt_static(Some(crate_type)), explicit_pic) { + (CrateType::Executable, _, _) if sess.is_wasi_reactor() => LinkOutputKind::WasiReactorExe, +- (CrateType::Executable, false, RelocModel::Pic | RelocModel::Pie) => { +- LinkOutputKind::DynamicPicExe +- } ++ (CrateType::Executable, false, true) => LinkOutputKind::DynamicPicExe, + (CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe, +- (CrateType::Executable, true, RelocModel::Pic | RelocModel::Pie) => { +- LinkOutputKind::StaticPicExe +- } ++ (CrateType::Executable, true, true) => LinkOutputKind::StaticPicExe, + (CrateType::Executable, true, _) => LinkOutputKind::StaticNoPicExe, + (_, true, _) => LinkOutputKind::StaticDylib, + (_, false, _) => LinkOutputKind::DynamicDylib, diff --git a/SPECS/rust.spec b/SPECS/rust.spec index 39910c2..2420fbe 100644 --- a/SPECS/rust.spec +++ b/SPECS/rust.spec @@ -78,7 +78,7 @@ %endif Name: rust -Version: 1.58.0 +Version: 1.58.1 Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -109,7 +109,7 @@ Patch101: rustc-1.58.0-disable-http2.patch # kernel rh1410097 causes too-small stacks for PIE. # (affects RHEL6 kernels when building for RHEL7) -Patch102: rustc-1.57.0-no-default-pie.patch +Patch102: rustc-1.58.0-no-default-pie.patch # Get the Rust triple for any arch. @@ -507,7 +507,7 @@ useful as a reference for code completion tools in various editors. %package analysis Summary: Compiler analysis data for the Rust standard library -Requires: rust-std-static%{?_isa} = %{version}-%{release} +Requires: %{name}-std-static%{?_isa} = %{version}-%{release} %description analysis This package contains analysis data files produced with rustc's -Zsave-analysis @@ -970,6 +970,9 @@ end} %changelog +* Thu Jan 20 2022 Josh Stone - 1.58.1-1 +- Update to 1.58.1. + * Thu Jan 13 2022 Josh Stone - 1.58.0-1 - Update to 1.58.0.