Merge branch 'master' into beta

This commit is contained in:
Josh Stone 2018-08-13 15:24:19 -07:00
commit a55bbef495
6 changed files with 135 additions and 17 deletions

8
.gitignore vendored
View File

@ -134,3 +134,11 @@
/rust-1.26.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.27.1-src.tar.xz
/rustc-1.27.2-src.tar.xz
/rustc-1.28.0-src.tar.xz
/rust-1.27.2-aarch64-unknown-linux-gnu.tar.xz
/rust-1.27.2-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.27.2-i686-unknown-linux-gnu.tar.xz
/rust-1.27.2-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.27.2-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.27.2-s390x-unknown-linux-gnu.tar.xz
/rust-1.27.2-x86_64-unknown-linux-gnu.tar.xz

View File

@ -0,0 +1,62 @@
From efa11da26a882aaf57f7eae747e48d128c474bf3 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Thu, 26 Jul 2018 17:20:02 -0700
Subject: [PATCH] rustc_metadata: test loading atoi instead of cos
Some platforms don't actually have `libm` already linked in the test
infrastructure, and then `dynamic_lib::tests::test_loading_cosine` would
fail to find the "cos" symbol. Every platform running this test should
have `libc` and "atoi" though, so try to use that symbol instead.
Fixes #45410.
---
src/librustc_metadata/dynamic_lib.rs | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/src/librustc_metadata/dynamic_lib.rs b/src/librustc_metadata/dynamic_lib.rs
index d7da0d00012e..182a071277ec 100644
--- a/src/librustc_metadata/dynamic_lib.rs
+++ b/src/librustc_metadata/dynamic_lib.rs
@@ -90,30 +90,29 @@ mod tests {
use std::mem;
#[test]
- fn test_loading_cosine() {
+ fn test_loading_atoi() {
if cfg!(windows) {
return
}
- // The math library does not need to be loaded since it is already
- // statically linked in
- let libm = match DynamicLibrary::open(None) {
+ // The C library does not need to be loaded since it is already linked in
+ let lib = match DynamicLibrary::open(None) {
Err(error) => panic!("Could not load self as module: {}", error),
- Ok(libm) => libm
+ Ok(lib) => lib
};
- let cosine: extern fn(libc::c_double) -> libc::c_double = unsafe {
- match libm.symbol("cos") {
- Err(error) => panic!("Could not load function cos: {}", error),
- Ok(cosine) => mem::transmute::<*mut u8, _>(cosine)
+ let atoi: extern fn(*const libc::c_char) -> libc::c_int = unsafe {
+ match lib.symbol("atoi") {
+ Err(error) => panic!("Could not load function atoi: {}", error),
+ Ok(atoi) => mem::transmute::<*mut u8, _>(atoi)
}
};
- let argument = 0.0;
- let expected_result = 1.0;
- let result = cosine(argument);
+ let argument = CString::new("1383428980").unwrap();
+ let expected_result = 0x52757374;
+ let result = atoi(argument.as_ptr());
if result != expected_result {
- panic!("cos({}) != {} but equaled {} instead", argument,
+ panic!("atoi({:?}) != {} but equaled {} instead", argument,
expected_result, result)
}
}

View File

@ -0,0 +1,26 @@
From 1ea2765918d1212a07e1359537470c477d82a681 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Mon, 30 Jul 2018 13:08:56 -0700
Subject: [PATCH] run-pass/const-endianness: negate before to_le()
`const LE_I128` needs parentheses to negate the value *before* calling
`to_le()`, otherwise it doesn't match the operations performed in the
black-boxed part of the test. This only makes a tangible difference on
big-endian targets.
---
src/test/run-pass/const-endianess.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/run-pass/const-endianess.rs b/src/test/run-pass/const-endianess.rs
index fa34b49210a6..95c738d3ec49 100644
--- a/src/test/run-pass/const-endianess.rs
+++ b/src/test/run-pass/const-endianess.rs
@@ -25,7 +25,7 @@ fn main() {
#[cfg(not(target_arch = "asmjs"))]
{
const BE_U128: u128 = 999999u128.to_be();
- const LE_I128: i128 = -999999i128.to_le();
+ const LE_I128: i128 = (-999999i128).to_le();
assert_eq!(BE_U128, b(999999u128).to_be());
assert_eq!(LE_I128, b(-999999i128).to_le());
}

View File

@ -9,10 +9,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.27.0
%global bootstrap_rust 1.27.2
%global bootstrap_cargo 1.27.0
%global bootstrap_channel %{bootstrap_rust}
%global bootstrap_date 2018-06-21
%global bootstrap_date 2018-07-20
# Only the specified arches will use bootstrap binaries.
#global bootstrap_arches %%{rust_arches}
@ -56,7 +56,7 @@
Name: rust
Version: %{rustc_version}
Release: 0.1.beta.14%{?dist}
Release: 3%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
# ^ written as: (rust itself) and (bundled libraries)
@ -70,6 +70,12 @@ ExclusiveArch: %{rust_arches}
%endif
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# https://github.com/rust-lang/rust/pull/52760
Patch1: rust-52760-test_loading_atoi.patch
# https://github.com/rust-lang/rust/pull/52876
Patch2: rust-52876-const-endianess.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
local abi = "gnu"
@ -148,6 +154,9 @@ BuildRequires: cmake >= 2.8.11
%if 0%{?epel}
%global llvm llvm5.0
%endif
%if 0%{?fedora} >= 29
%global llvm llvm6.0
%endif
%if %defined llvm
%global llvm_root %{_libdir}/%{llvm}
%else
@ -168,7 +177,7 @@ BuildRequires: procps-ng
BuildRequires: gdb
# TODO: work on unbundling these!
Provides: bundled(libbacktrace) = 6.1.0
Provides: bundled(libbacktrace) = 8.1.0
Provides: bundled(miniz) = 1.16~beta+r1
# Virtual provides for folks who attempt "dnf install rustc"
@ -187,8 +196,8 @@ Requires: /usr/bin/cc
%global _privatelibs lib(.*-[[:xdigit:]]*|rustc.*)[.]so.*
%global __provides_exclude ^(%{_privatelibs})$
%global __requires_exclude ^(%{_privatelibs})$
%global __provides_exclude_from ^%{_docdir}/.*$
%global __requires_exclude_from ^%{_docdir}/.*$
%global __provides_exclude_from ^(%{_docdir}|%{rustlibdir}/src)/.*$
%global __requires_exclude_from ^(%{_docdir}|%{rustlibdir}/src)/.*$
# While we don't want to encourage dynamic linking to Rust shared libraries, as
# there's no stable ABI, we still need the unallocated metadata (.rustc) to
@ -368,6 +377,9 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package}
%patch1 -p1
%patch2 -p1
%if "%{python}" == "python3"
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
%endif
@ -446,6 +458,7 @@ export LIBGIT2_SYS_USE_PKG_CONFIG=1
%{enable_debuginfo} \
--enable-extended \
--enable-vendor \
--enable-verbose-tests \
--release-channel=%{channel}
%{python} ./x.py build
@ -484,6 +497,9 @@ find %{buildroot}%{_libdir} -maxdepth 1 -type f -name '*.so' \
# Remove installer artifacts (manifests, uninstall scripts, etc.)
find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -exec rm -v '{}' '+'
# Remove backup files from %%configure munging
find %{buildroot}%{rustlibdir} -type f -name '*.orig' -exec rm -v '{}' '+'
# FIXME: __os_install_post will strip the rlibs
# -- should we find a way to preserve debuginfo?
@ -637,8 +653,14 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
%changelog
* Thu Jul 26 2018 Josh Stone <jistone@redhat.com> - 1.28.0-0.1.beta.14
- beta test
* Mon Aug 13 2018 Josh Stone <jistone@redhat.com> - 1.28.0-3
- Use llvm6.0 instead of llvm-7 for now
* Tue Aug 07 2018 Josh Stone <jistone@redhat.com> - 1.28.0-2
- Rebuild for LLVM ppc64/s390x fixes
* Thu Aug 02 2018 Josh Stone <jistone@redhat.com> - 1.28.0-1
- Update to 1.28.0.
* Tue Jul 24 2018 Josh Stone <jistone@redhat.com> - 1.27.2-4
- Update to 1.27.2.

View File

@ -1 +1 @@
SHA512 (rustc-1.27.2-src.tar.xz) = 3a54d5d04512a454bb6ccc1e05e513ba36051555c4acfb3b99e072cd3a113f66533c5d39410eb3ababd6e79fb2f16b0e569a45597e82ec2158b585e8aec60407
SHA512 (rustc-1.28.0-src.tar.xz) = a4885cd42a1006738cca2f0d8c0d5e4fd4014fc4629cbf691935bd36ffb896c553717022e67532359b5f1bd8e5050fc38b9dffed7c45cc76f7089ec134dfb980

View File

@ -1,8 +1,8 @@
SHA512 (rustc-1.27.2-src.tar.xz) = 3a54d5d04512a454bb6ccc1e05e513ba36051555c4acfb3b99e072cd3a113f66533c5d39410eb3ababd6e79fb2f16b0e569a45597e82ec2158b585e8aec60407
SHA512 (rust-1.26.0-aarch64-unknown-linux-gnu.tar.xz) = 731e1db2e39d412997cee3d8d51a9d45a84e7092f1c66524f311f4967f7638964581a8c71a5937a7f80a8e0bae153298a6a806e56e525015ab7caf7b040b14b7
SHA512 (rust-1.26.0-armv7-unknown-linux-gnueabihf.tar.xz) = 5766dbba6f4faae3e8dfd1d98ea948e3835d5b1c28b8daf6c734afd7f27301aa857147eb28762462f77c9da539aae2a81319f194154245abd5cdae7067f24d6c
SHA512 (rust-1.26.0-i686-unknown-linux-gnu.tar.xz) = 1257f9edefc49ee1742c3acd666d15f077c4d999a82dfe0d574df5c41981c3f716adf86b23d96cf9a6757508aea92abcbe06ad9e3bec2cb4ac19512d60ebba31
SHA512 (rust-1.26.0-powerpc64le-unknown-linux-gnu.tar.xz) = 9b856967cb94e3d930877d9b28bd9ae2e223a15a15231315f02bfd9c47ad488461b1a55458a6e3f1c9c9a8367c0c3af5ff1dc19d29f3b3debe9baaf2e1b64701
SHA512 (rust-1.26.0-powerpc64-unknown-linux-gnu.tar.xz) = 62e8acd65b9e56e3d3cc46c5d9984b9c80ef83d7204c3f87dbce9a1229ef19db39ed14154fda4416c1656103f82e106b19ba709943d94d408e11283470a94908
SHA512 (rust-1.26.0-s390x-unknown-linux-gnu.tar.xz) = f78b8be5c7a2c1c07527959c4c57cfb0fc43ef79fa313eb8c1afd1fc024753fac17f0001f930b651035c1e704ee391d822ddf588a242dc75cc476b3f20dea682
SHA512 (rust-1.26.0-x86_64-unknown-linux-gnu.tar.xz) = 457503fea324251a92f25d0d45f1e2ac7d342a6a8f52d1abe93a579c7ae9b7f453a707d353e82614b37790747e8551f9762188ee25ff883495598cbf17b3f97e
SHA512 (rustc-1.28.0-src.tar.xz) = a4885cd42a1006738cca2f0d8c0d5e4fd4014fc4629cbf691935bd36ffb896c553717022e67532359b5f1bd8e5050fc38b9dffed7c45cc76f7089ec134dfb980
SHA512 (rust-1.27.2-aarch64-unknown-linux-gnu.tar.xz) = 84022350f1e8fc34a353a09848333424a557ddea3b9445a1a5fc9d2f2abced942154e80888ab4091174d6d83c6766f583ef240ab2e2233de5d536633d2765040
SHA512 (rust-1.27.2-armv7-unknown-linux-gnueabihf.tar.xz) = afa6469ebc851b1c4f3911434504c52d6fb0e2f9779048fa6217cce65cbf8fdd9f3ba990dc8f0e99371040b32ee304e88bfbf27604385c6d3216e0ca44f200a1
SHA512 (rust-1.27.2-i686-unknown-linux-gnu.tar.xz) = e17960120bdd18a527c0783ce8ca8d76cdc9b436f36a73a82fd2ea709b253f33feeb88310fab7a86305bad403eb5dad7ea43d0e5bc5ad1e3847f29e85040303a
SHA512 (rust-1.27.2-powerpc64le-unknown-linux-gnu.tar.xz) = 4993430b97f348620338524dbd5f64c6b662cfca51ce1616902e48e08babc0287f6b0db73e13b0ce478a60c98b17f3878c35a33823692fa0e37e265797bb661f
SHA512 (rust-1.27.2-powerpc64-unknown-linux-gnu.tar.xz) = 21d90f1e71f99e2bf11ba795e76eb428e88d6ac2cb0197f7111e3a4923fa2896b9f41bd54cac5c43329a3d03484d5441e3b8aad599164c69a0c99e08a7ecac15
SHA512 (rust-1.27.2-s390x-unknown-linux-gnu.tar.xz) = f6ee1e3c41c2602064377262fe74b39b0908a3fb8995c71a7b02ea8c8f0fe6909ffc7ee953e6b0865793d3a8e577096c85d9d9ce51388bb52d7fdc11fcb9db46
SHA512 (rust-1.27.2-x86_64-unknown-linux-gnu.tar.xz) = 14861392dad81d2c040d0deb64d5dd34652d5cc2875e404609a0f13c8fb6bdc38f9bc7b1e309829365a00c42b610f2b7a73cffa232ecfdf0618b5508a8667198