import rust-1.58.1-1.el9

This commit is contained in:
CentOS Sources 2022-03-01 05:44:34 -05:00 committed by Stepan Oksanichenko
parent 78faf0cbb4
commit 2ead9ecd11
5 changed files with 52 additions and 29 deletions

2
.gitignore vendored
View File

@ -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 SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz

View File

@ -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 b8865d1192852214d6d9b0a0957d4b36c16832aa SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz

View File

@ -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,

View File

@ -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,

View File

@ -78,7 +78,7 @@
%endif %endif
Name: rust Name: rust
Version: 1.58.0 Version: 1.58.1
Release: 1%{?dist} Release: 1%{?dist}
Summary: The Rust Programming Language Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT) 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. # kernel rh1410097 causes too-small stacks for PIE.
# (affects RHEL6 kernels when building for RHEL7) # (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. # Get the Rust triple for any arch.
@ -507,7 +507,7 @@ useful as a reference for code completion tools in various editors.
%package analysis %package analysis
Summary: Compiler analysis data for the Rust standard library 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 %description analysis
This package contains analysis data files produced with rustc's -Zsave-analysis This package contains analysis data files produced with rustc's -Zsave-analysis
@ -970,6 +970,9 @@ end}
%changelog %changelog
* Thu Jan 20 2022 Josh Stone <jistone@redhat.com> - 1.58.1-1
- Update to 1.58.1.
* Thu Jan 13 2022 Josh Stone <jistone@redhat.com> - 1.58.0-1 * Thu Jan 13 2022 Josh Stone <jistone@redhat.com> - 1.58.0-1
- Update to 1.58.0. - Update to 1.58.0.