import rust-1.50.0-1.module+el8.4.0+11107+9ed4d29c

This commit is contained in:
CentOS Sources 2021-06-14 18:34:28 +00:00 committed by Andrew Lukoshko
parent a14c1e141c
commit 64f7e7d3b4
7 changed files with 146 additions and 118 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/rustc-1.48.0-src.tar.xz
SOURCES/rustc-1.50.0-src.tar.xz

View File

@ -1 +1 @@
036f83df6255166cef0e2241ef0627e2568244b4 SOURCES/rustc-1.48.0-src.tar.xz
d80e7872b60faebce49dca4008ccd603daabcf1e SOURCES/rustc-1.50.0-src.tar.xz

View File

@ -0,0 +1,102 @@
From eaf7ea1fc339e1ff348ed941ed2e8c4d66f3e458 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 18 Feb 2021 19:14:58 -0800
Subject: [PATCH] Revert "Auto merge of #79547 - erikdesjardins:byval,
r=nagisa"
This reverts commit a094ff9590b83c8f94d898f92c2964a5803ded06, reversing
changes made to d37afad0cc87bf709ad10c85319296ac53030f03.
---
compiler/rustc_middle/src/ty/layout.rs | 12 ++++++------
...return-value-in-reg.rs => return-value-in-reg.rs} | 4 ++--
src/test/codegen/union-abi.rs | 11 +++--------
3 files changed, 11 insertions(+), 16 deletions(-)
rename src/test/codegen/{arg-return-value-in-reg.rs => return-value-in-reg.rs} (74%)
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs
index b545b92c9252..545f6aee1a21 100644
--- a/compiler/rustc_middle/src/ty/layout.rs
+++ b/compiler/rustc_middle/src/ty/layout.rs
@@ -2849,7 +2849,7 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) {
|| abi == SpecAbi::RustIntrinsic
|| abi == SpecAbi::PlatformIntrinsic
{
- let fixup = |arg: &mut ArgAbi<'tcx, Ty<'tcx>>| {
+ let fixup = |arg: &mut ArgAbi<'tcx, Ty<'tcx>>, is_ret: bool| {
if arg.is_ignore() {
return;
}
@@ -2887,9 +2887,9 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) {
_ => return,
}
- // Pass and return structures up to 2 pointers in size by value, matching `ScalarPair`.
- // LLVM will usually pass these in 2 registers, which is more efficient than by-ref.
- let max_by_val_size = Pointer.size(cx) * 2;
+ // Return structures up to 2 pointers in size by value, matching `ScalarPair`. LLVM
+ // will usually return these in 2 registers, which is more efficient than by-ref.
+ let max_by_val_size = if is_ret { Pointer.size(cx) * 2 } else { Pointer.size(cx) };
let size = arg.layout.size;
if arg.layout.is_unsized() || size > max_by_val_size {
@@ -2901,9 +2901,9 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) {
arg.cast_to(Reg { kind: RegKind::Integer, size });
}
};
- fixup(&mut self.ret);
+ fixup(&mut self.ret, true);
for arg in &mut self.args {
- fixup(arg);
+ fixup(arg, false);
}
return;
}
diff --git a/src/test/codegen/arg-return-value-in-reg.rs b/src/test/codegen/return-value-in-reg.rs
similarity index 74%
rename from src/test/codegen/arg-return-value-in-reg.rs
rename to src/test/codegen/return-value-in-reg.rs
index a69291d47821..4bc0136c5e32 100644
--- a/src/test/codegen/arg-return-value-in-reg.rs
+++ b/src/test/codegen/return-value-in-reg.rs
@@ -1,4 +1,4 @@
-//! Check that types of up to 128 bits are passed and returned by-value instead of via pointer.
+//! This test checks that types of up to 128 bits are returned by-value instead of via out-pointer.
// compile-flags: -C no-prepopulate-passes -O
// only-x86_64
@@ -11,7 +11,7 @@ pub struct S {
c: u32,
}
-// CHECK: define i128 @modify(i128{{( %0)?}})
+// CHECK: define i128 @modify(%S* noalias nocapture dereferenceable(16) %s)
#[no_mangle]
pub fn modify(s: S) -> S {
S { a: s.a + s.a, b: s.b + s.b, c: s.c + s.c }
diff --git a/src/test/codegen/union-abi.rs b/src/test/codegen/union-abi.rs
index f282fd237054..afea01e9a2d0 100644
--- a/src/test/codegen/union-abi.rs
+++ b/src/test/codegen/union-abi.rs
@@ -63,16 +63,11 @@ pub union UnionU128{a:u128}
#[no_mangle]
pub fn test_UnionU128(_: UnionU128) -> UnionU128 { loop {} }
-pub union UnionU128x2{a:(u128, u128)}
-// CHECK: define void @test_UnionU128x2(i128 %_1.0, i128 %_1.1)
-#[no_mangle]
-pub fn test_UnionU128x2(_: UnionU128x2) { loop {} }
-
#[repr(C)]
-pub union CUnionU128x2{a:(u128, u128)}
-// CHECK: define void @test_CUnionU128x2(%CUnionU128x2* {{.*}} %_1)
+pub union CUnionU128{a:u128}
+// CHECK: define void @test_CUnionU128(%CUnionU128* {{.*}} %_1)
#[no_mangle]
-pub fn test_CUnionU128x2(_: CUnionU128x2) { loop {} }
+pub fn test_CUnionU128(_: CUnionU128) { loop {} }
pub union UnionBool { b:bool }
// CHECK: define zeroext i1 @test_UnionBool(i8 %b)
--
2.29.2

View File

@ -1,46 +0,0 @@
From f200c1e7afdd04b42c01c0108735e5b14ca07d93 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 9 Oct 2020 20:12:26 -0700
Subject: [PATCH] doc: disambiguate stat in MetadataExt::as_raw_stat
A few architectures in `os::linux::raw` import `libc::stat`, rather than
defining that type directly. However, that also imports the _function_
called `stat`, which makes this doc link ambiguous:
error: `crate::os::linux::raw::stat` is both a struct and a function
--> library/std/src/os/linux/fs.rs:21:19
|
21 | /// [`stat`]: crate::os::linux::raw::stat
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous link
|
= note: `-D broken-intra-doc-links` implied by `-D warnings`
help: to link to the struct, prefix with the item type
|
21 | /// [`stat`]: struct@crate::os::linux::raw::stat
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: to link to the function, add parentheses
|
21 | /// [`stat`]: crate::os::linux::raw::stat()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We want the `struct`, so it's now prefixed accordingly.
---
library/std/src/os/linux/fs.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs
index ff23c3d67e3b..9b7af97616c9 100644
--- a/library/std/src/os/linux/fs.rs
+++ b/library/std/src/os/linux/fs.rs
@@ -20,7 +20,7 @@ pub trait MetadataExt {
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
/// cross-Unix abstractions contained within the raw stat.
///
- /// [`stat`]: crate::os::linux::raw::stat
+ /// [`stat`]: struct@crate::os::linux::raw::stat
///
/// # Examples
///
--
2.26.2

View File

@ -1,28 +0,0 @@
From 6f8efee8c936de65bc31610eea30abd5461a5dd1 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 8 Oct 2020 15:53:49 -0700
Subject: [PATCH] use NativeEndian in symbolize::gimli::Context
`Object` uses `NativeEndian`, so the `Context` should too.
Cc: https://github.com/rust-lang/rust/issues/77410
---
src/symbolize/gimli.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/symbolize/gimli.rs b/src/symbolize/gimli.rs
index 58ed8bafca3d..273ff43f1c8c 100644
--- a/src/symbolize/gimli.rs
+++ b/src/symbolize/gimli.rs
@@ -5,7 +5,7 @@
//! intended to wholesale replace the `libbacktrace.rs` implementation.
use self::gimli::read::EndianSlice;
-use self::gimli::LittleEndian as Endian;
+use self::gimli::NativeEndian as Endian;
use self::mmap::Mmap;
use self::stash::Stash;
use super::BytesOrWideString;
--
2.26.2

View File

@ -1,6 +1,6 @@
--- rustc-1.48.0-src/Cargo.lock.orig 2020-11-16 09:36:19.889728111 -0800
+++ rustc-1.48.0-src/Cargo.lock 2020-11-16 09:36:19.890728089 -0800
@@ -849,7 +849,6 @@
--- rustc-1.49.0-src/Cargo.lock.orig 2021-01-05 12:45:10.456414612 -0800
+++ rustc-1.49.0-src/Cargo.lock 2021-01-05 12:45:10.458414575 -0800
@@ -882,7 +882,6 @@
dependencies = [
"cc",
"libc",
@ -8,7 +8,7 @@
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -1682,16 +1681,6 @@
@@ -1728,16 +1727,6 @@
]
[[package]]
@ -25,20 +25,20 @@
name = "libz-sys"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
--- rustc-1.48.0-src/src/tools/cargo/Cargo.toml.orig 2020-11-16 06:02:09.000000000 -0800
+++ rustc-1.48.0-src/src/tools/cargo/Cargo.toml 2020-11-16 09:36:19.890728089 -0800
--- rustc-1.49.0-src/src/tools/cargo/Cargo.toml.orig 2021-01-05 12:45:10.458414575 -0800
+++ rustc-1.49.0-src/src/tools/cargo/Cargo.toml 2021-01-05 12:47:25.966928554 -0800
@@ -25,7 +25,7 @@
crates-io = { path = "crates/crates-io", version = "0.31.1" }
crossbeam-utils = "0.7"
crossbeam-utils = "0.8"
crypto-hash = "0.3.1"
-curl = { version = "0.4.23", features = ["http2"] }
+curl = { version = "0.4.23", features = [] }
curl-sys = "0.4.22"
env_logger = "0.7.0"
env_logger = "0.8.1"
pretty_env_logger = { version = "0.4", optional = true }
--- rustc-1.48.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-11-16 06:02:09.000000000 -0800
+++ rustc-1.48.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-11-16 09:36:19.890728089 -0800
@@ -396,14 +396,8 @@
--- rustc-1.49.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-12-28 19:03:25.000000000 -0800
+++ rustc-1.49.0-src/src/tools/cargo/src/cargo/core/package.rs 2021-01-05 12:45:10.458414575 -0800
@@ -408,14 +408,8 @@
// Also note that pipelining is disabled as curl authors have indicated
// that it's buggy, and we've empirically seen that it's buggy with HTTP
// proxies.
@ -55,7 +55,7 @@
Ok(PackageSet {
packages: package_ids
@@ -566,7 +560,7 @@
@@ -584,7 +578,7 @@
macro_rules! try_old_curl {
($e:expr, $msg:expr) => {
let result = $e;

View File

@ -10,10 +10,10 @@
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD
# Note that cargo matches the program version here, not its crate version.
%global bootstrap_rust 1.47.0
%global bootstrap_cargo 1.47.0
%global bootstrap_channel 1.47.0
%global bootstrap_date 2020-10-08
%global bootstrap_rust 1.49.0
%global bootstrap_cargo 1.49.0
%global bootstrap_channel 1.49.0
%global bootstrap_date 2020-12-31
# Only the specified arches will use bootstrap binaries.
#global bootstrap_arches %%{rust_arches}
@ -22,11 +22,11 @@
%bcond_with llvm_static
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM
# is insufficient. Rust currently requires LLVM 8.0+.
# is insufficient. Rust currently requires LLVM 9.0+.
%bcond_with bundled_llvm
# Requires stable libgit2 1.0
%if 0%{?fedora} >= 32
# Requires stable libgit2 1.1
%if 0%{?fedora} >= 34
%bcond_with bundled_libgit2
%else
%bcond_without bundled_libgit2
@ -53,7 +53,7 @@
%endif
Name: rust
Version: 1.48.0
Version: 1.50.0
Release: 1%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
@ -68,11 +68,9 @@ ExclusiveArch: %{rust_arches}
%endif
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# https://github.com/rust-lang/backtrace-rs/pull/373
Patch1: 0001-use-NativeEndian-in-symbolize-gimli-Context.patch
# https://github.com/rust-lang/rust/pull/77777
Patch2: 0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch
# This internal rust-abi change broke s390x -- revert for now.
# https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032
Patch1: 0001-Revert-Auto-merge-of-79547.patch
### RHEL-specific patches below ###
@ -81,7 +79,7 @@ Patch100: rustc-1.48.0-disable-libssh2.patch
# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys
# will try to build it statically -- instead we turn off the feature.
Patch101: rustc-1.48.0-disable-http2.patch
Patch101: rustc-1.49.0-disable-http2.patch
# kernel rh1410097 causes too-small stacks for PIE.
# (affects RHEL6 kernels when building for RHEL7)
@ -155,10 +153,10 @@ BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib)
%if %without bundled_libgit2
BuildRequires: pkgconfig(libgit2) >= 1.0.0
BuildRequires: pkgconfig(libgit2) >= 1.1.0
%endif
%if %{without disabled_libssh2} && %{without bundled_libssh2}
%if %{without disabled_libssh2}
# needs libssh2_userauth_publickey_frommemory
BuildRequires: pkgconfig(libssh2) >= 1.6.0
%endif
@ -180,7 +178,7 @@ BuildRequires: cmake >= 2.8.11
%global llvm llvm
%global llvm_root %{_prefix}
%endif
BuildRequires: %{llvm}-devel >= 8.0
BuildRequires: %{llvm}-devel >= 9.0
%if %with llvm_static
BuildRequires: %{llvm}-static
BuildRequires: libffi-devel
@ -300,9 +298,6 @@ Summary: Rust's package manager and build tool
%if %with bundled_libgit2
Provides: bundled(libgit2) = 1.1.0
%endif
%if %with bundled_libssh2
Provides: bundled(libssh2) = 1.9.0~dev
%endif
# For tests:
BuildRequires: git
# Cargo is not much use without Rust
@ -346,9 +341,6 @@ Summary: Rust Language Server for IDE integration
%if %with bundled_libgit2
Provides: bundled(libgit2) = 1.1.0
%endif
%if %with bundled_libssh2
Provides: bundled(libssh2) = 1.9.0~dev
%endif
Requires: rust-analysis
# /usr/bin/rls is dynamically linked against internal rustc libs
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -409,8 +401,7 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package}
%patch1 -p1 -d library/backtrace
%patch2 -p1
%patch1 -p1
%if %with disabled_libssh2
%patch100 -p1
@ -438,6 +429,7 @@ mkdir -p src/llvm-project/libunwind/
# Remove other unused vendored libraries
rm -rf vendor/curl-sys/curl/
rm -rf vendor/jemalloc-sys/jemalloc/
rm -rf vendor/libssh2-sys/libssh2/
rm -rf vendor/libz-sys/src/zlib/
rm -rf vendor/libz-sys/src/zlib-ng/
rm -rf vendor/lzma-sys/xz-*/
@ -447,9 +439,6 @@ rm -rf vendor/openssl-src/openssl/
rm -rf vendor/libgit2-sys/libgit2/
%endif
%if %without bundled_libssh2
rm -rf vendor/libssh2-sys/libssh2/
%endif
%if %with disabled_libssh2
rm -rf vendor/libssh2-sys/
%endif
@ -489,7 +478,7 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
# convince libgit2-sys to use the distro libgit2
%global rust_env %{rust_env} LIBGIT2_SYS_USE_PKG_CONFIG=1
%endif
%if %without bundled_libssh2
%if %without disabled_libssh2
# convince libssh2-sys to use the distro libssh2
%global rust_env %{rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1
%endif
@ -547,7 +536,8 @@ fi
--enable-vendor \
--enable-verbose-tests \
%{?codegen_units_std} \
--release-channel=%{channel}
--release-channel=%{channel} \
--release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}"
%{python} ./x.py build -j "$ncpus" --stage 2
%{python} ./x.py doc --stage 2
@ -621,6 +611,9 @@ rm -f %{buildroot}%{_bindir}/rust-lldb
rm -f %{buildroot}%{rustlibdir}/etc/lldb_*
%endif
# We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp)
rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
%check
export %{rust_env}
@ -695,6 +688,7 @@ export %{rust_env}
%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY
%doc src/tools/cargo/README.md
%{_bindir}/cargo
%{_libexecdir}/cargo*
%{_mandir}/man1/cargo*.1*
%{_sysconfdir}/bash_completion.d/cargo
%{_datadir}/zsh/site-functions/_cargo
@ -738,6 +732,12 @@ export %{rust_env}
%changelog
* Mon May 24 2021 Josh Stone <jistone@redhat.com> - 1.50.0-1
- Update to 1.50.0.
* Wed Jan 13 2021 Josh Stone <jistone@redhat.com> - 1.49.0-1
- Update to 1.49.0.
* Tue Jan 12 2021 Josh Stone <jistone@redhat.com> - 1.48.0-1
- Update to 1.48.0.