Update to 1.20.0.
Add a rust-src subpackage.
This commit is contained in:
parent
724804353b
commit
6eec89a42b
8
.gitignore
vendored
8
.gitignore
vendored
@ -65,3 +65,11 @@
|
||||
/rust-1.18.0-powerpc64-unknown-linux-gnu.tar.gz
|
||||
/rust-1.18.0-s390x-unknown-linux-gnu.tar.gz
|
||||
/rust-1.18.0-x86_64-unknown-linux-gnu.tar.gz
|
||||
/rustc-1.20.0-src.tar.xz
|
||||
/rust-1.19.0-aarch64-unknown-linux-gnu.tar.xz
|
||||
/rust-1.19.0-armv7-unknown-linux-gnueabihf.tar.xz
|
||||
/rust-1.19.0-i686-unknown-linux-gnu.tar.xz
|
||||
/rust-1.19.0-powerpc64le-unknown-linux-gnu.tar.xz
|
||||
/rust-1.19.0-powerpc64-unknown-linux-gnu.tar.xz
|
||||
/rust-1.19.0-s390x-unknown-linux-gnu.tar.xz
|
||||
/rust-1.19.0-x86_64-unknown-linux-gnu.tar.xz
|
||||
|
@ -1,80 +0,0 @@
|
||||
From 1d5e3cd80b66a3abd274107e75854476c603617d Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Wed, 5 Jul 2017 12:03:17 -0700
|
||||
Subject: [PATCH] Skip the main thread's manual stack guard on Linux
|
||||
|
||||
Linux doesn't allocate the whole stack right away, and the kernel has
|
||||
its own stack-guard mechanism to fault when growing too close to an
|
||||
existing mapping. If we map our own guard, then the kernel starts
|
||||
enforcing a rather large gap above that, rendering much of the possible
|
||||
stack space useless.
|
||||
|
||||
Instead, we'll just note where we expect rlimit to start faulting, so
|
||||
our handler can report "stack overflow", and trust that the kernel's own
|
||||
stack guard will work.
|
||||
|
||||
Fixes #43052.
|
||||
---
|
||||
src/libstd/sys/unix/thread.rs | 44 ++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 29 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
|
||||
index 1642baa34d63..15747746611c 100644
|
||||
--- a/src/libstd/sys/unix/thread.rs
|
||||
+++ b/src/libstd/sys/unix/thread.rs
|
||||
@@ -264,23 +264,37 @@ pub mod guard {
|
||||
as *mut libc::c_void;
|
||||
}
|
||||
|
||||
- // Rellocate the last page of the stack.
|
||||
- // This ensures SIGBUS will be raised on
|
||||
- // stack overflow.
|
||||
- let result = mmap(stackaddr, psize, PROT_NONE,
|
||||
- MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
||||
-
|
||||
- if result != stackaddr || result == MAP_FAILED {
|
||||
- panic!("failed to allocate a guard page");
|
||||
- }
|
||||
-
|
||||
- let offset = if cfg!(any(target_os = "linux", target_os = "freebsd")) {
|
||||
- 2
|
||||
+ if cfg!(target_os = "linux") {
|
||||
+ // Linux doesn't allocate the whole stack right away, and
|
||||
+ // the kernel has its own stack-guard mechanism to fault
|
||||
+ // when growing too close to an existing mapping. If we map
|
||||
+ // our own guard, then the kernel starts enforcing a rather
|
||||
+ // large gap above that, rendering much of the possible
|
||||
+ // stack space useless. See #43052.
|
||||
+ //
|
||||
+ // Instead, we'll just note where we expect rlimit to start
|
||||
+ // faulting, so our handler can report "stack overflow", and
|
||||
+ // trust that the kernel's own stack guard will work.
|
||||
+ Some(stackaddr as usize)
|
||||
} else {
|
||||
- 1
|
||||
- };
|
||||
+ // Reallocate the last page of the stack.
|
||||
+ // This ensures SIGBUS will be raised on
|
||||
+ // stack overflow.
|
||||
+ let result = mmap(stackaddr, psize, PROT_NONE,
|
||||
+ MAP_PRIVATE | MAP_ANON | MAP_FIXED, -1, 0);
|
||||
+
|
||||
+ if result != stackaddr || result == MAP_FAILED {
|
||||
+ panic!("failed to allocate a guard page");
|
||||
+ }
|
||||
|
||||
- Some(stackaddr as usize + offset * psize)
|
||||
+ let offset = if cfg!(target_os = "freebsd") {
|
||||
+ 2
|
||||
+ } else {
|
||||
+ 1
|
||||
+ };
|
||||
+
|
||||
+ Some(stackaddr as usize + offset * psize)
|
||||
+ }
|
||||
}
|
||||
|
||||
#[cfg(target_os = "solaris")]
|
||||
--
|
||||
2.13.3
|
||||
|
28
rust-1.20.0-44203-exclude-compiler-rt-test.patch
Normal file
28
rust-1.20.0-44203-exclude-compiler-rt-test.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 35f8a2065b7d17d39481a75cefa739df7a061084 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Wed, 30 Aug 2017 18:20:59 -0700
|
||||
Subject: [PATCH] rustbuild: update the rust-src filter for compiler-rt
|
||||
|
||||
We wanted `src/compiler-rt/test` filtered from the `rust-src` package,
|
||||
but that path is now `src/libcompiler_builtins/compiler-rt/test`. This
|
||||
saves over half of the installed rust-src size. (50MB -> 22MB)
|
||||
---
|
||||
src/bootstrap/dist.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
|
||||
index 746f85a9d59d..05d59e7d5956 100644
|
||||
--- a/src/bootstrap/dist.rs
|
||||
+++ b/src/bootstrap/dist.rs
|
||||
@@ -562,7 +562,7 @@ impl Step for Src {
|
||||
"src/libprofiler_builtins",
|
||||
];
|
||||
let std_src_dirs_exclude = [
|
||||
- "src/compiler-rt/test",
|
||||
+ "src/libcompiler_builtins/compiler-rt/test",
|
||||
"src/jemalloc/test/unit",
|
||||
];
|
||||
|
||||
--
|
||||
2.13.5
|
||||
|
55
rust.spec
55
rust.spec
@ -8,10 +8,10 @@
|
||||
# To bootstrap from scratch, set the channel and date from src/stage0.txt
|
||||
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
|
||||
# or nightly wants some beta-YYYY-MM-DD
|
||||
%global bootstrap_rust 1.18.0
|
||||
%global bootstrap_cargo 0.19.0
|
||||
%global bootstrap_rust 1.19.0
|
||||
%global bootstrap_cargo 0.20.0
|
||||
%global bootstrap_channel %{bootstrap_rust}
|
||||
%global bootstrap_date 2017-06-08
|
||||
%global bootstrap_date 2017-07-20
|
||||
|
||||
# Only the specified arches will use bootstrap binaries.
|
||||
#global bootstrap_arches %%{rust_arches}
|
||||
@ -47,8 +47,8 @@
|
||||
|
||||
|
||||
Name: rust
|
||||
Version: 1.19.0
|
||||
Release: 4%{?dist}
|
||||
Version: 1.20.0
|
||||
Release: 1%{?dist}
|
||||
Summary: The Rust Programming Language
|
||||
License: (ASL 2.0 or MIT) and (BSD and ISC and MIT)
|
||||
# ^ written as: (rust itself) and (bundled libraries)
|
||||
@ -62,8 +62,8 @@ ExclusiveArch: %{rust_arches}
|
||||
%endif
|
||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||
|
||||
Patch1: rust-1.19.0-43072-stack-guard.patch
|
||||
Patch2: rust-1.19.0-43297-configure-debuginfo.patch
|
||||
Patch1: rust-1.19.0-43297-configure-debuginfo.patch
|
||||
Patch2: rust-1.20.0-44203-exclude-compiler-rt-test.patch
|
||||
|
||||
# Get the Rust triple for any arch.
|
||||
%{lua: function rust_triple(arch)
|
||||
@ -93,7 +93,7 @@ end}
|
||||
.."/rust-%{bootstrap_channel}")
|
||||
local target_arch = rpm.expand("%{_target_cpu}")
|
||||
for i, arch in ipairs(bootstrap_arches) do
|
||||
print(string.format("Source%d: %s-%s.tar.gz\n",
|
||||
print(string.format("Source%d: %s-%s.tar.xz\n",
|
||||
i, base, rust_triple(arch)))
|
||||
if arch == target_arch then
|
||||
rpm.define("bootstrap_source "..i)
|
||||
@ -123,7 +123,7 @@ BuildRequires: curl
|
||||
|
||||
%if %with bundled_llvm
|
||||
BuildRequires: cmake3
|
||||
Provides: bundled(llvm) = 3.9
|
||||
Provides: bundled(llvm) = 4.0
|
||||
%else
|
||||
%if 0%{?epel}
|
||||
%global llvm llvm3.9
|
||||
@ -164,7 +164,7 @@ Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
|
||||
# The C compiler is needed at runtime just for linking. Someday rustc might
|
||||
# invoke the linker directly, and then we'll only need binutils.
|
||||
# https://github.com/rust-lang/rust/issues/11937
|
||||
Requires: gcc
|
||||
Requires: /usr/bin/cc
|
||||
|
||||
# ALL Rust libraries are private, because they don't keep an ABI.
|
||||
%global _privatelibs lib.*-[[:xdigit:]]*[.]so.*
|
||||
@ -258,6 +258,15 @@ This package includes HTML documentation for the Rust programming language and
|
||||
its standard library.
|
||||
|
||||
|
||||
%package src
|
||||
Summary: Sources for the Rust standard library
|
||||
BuildArch: noarch
|
||||
|
||||
%description src
|
||||
This package includes source files for the Rust standard library. It may be
|
||||
useful as a reference for code completion tools in various editors.
|
||||
|
||||
|
||||
%prep
|
||||
|
||||
%ifarch %{bootstrap_arches}
|
||||
@ -270,8 +279,9 @@ test -f '%{local_rust_root}/bin/rustc'
|
||||
|
||||
%setup -q -n %{rustc_package}
|
||||
|
||||
# unbundle
|
||||
rm -rf src/jemalloc/
|
||||
# We're disabling jemalloc, but rust-src still wants it.
|
||||
# rm -rf src/jemalloc/
|
||||
|
||||
%if %without bundled_llvm
|
||||
rm -rf src/llvm/
|
||||
%endif
|
||||
@ -281,13 +291,6 @@ cp src/rt/hoedown/LICENSE src/rt/hoedown/LICENSE-hoedown
|
||||
sed -e '/*\//q' src/libbacktrace/backtrace.h \
|
||||
>src/libbacktrace/LICENSE-libbacktrace
|
||||
|
||||
# These tests assume that alloc_jemalloc is present
|
||||
# https://github.com/rust-lang/rust/issues/35017
|
||||
sed -i.jemalloc -e '1i // ignore-test jemalloc is disabled' \
|
||||
src/test/compile-fail/allocator-dylib-is-system.rs \
|
||||
src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs \
|
||||
src/test/run-pass/allocator-default.rs
|
||||
|
||||
# This tests a problem of exponential growth, which seems to be less-reliably
|
||||
# fixed when running on older LLVM and/or some arches. Just skip it for now.
|
||||
sed -i.ignore -e '1i // ignore-test may still be exponential...' \
|
||||
@ -306,8 +309,8 @@ sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \
|
||||
src/librustc_llvm/lib.rs
|
||||
%endif
|
||||
|
||||
%patch1 -p1 -b .stack-guard
|
||||
%patch2 -p1 -b .debuginfo
|
||||
%patch1 -p1 -b .debuginfo
|
||||
%patch2 -p1 -b .compiler-rt
|
||||
|
||||
# The configure macro will modify some autoconf-related files, which upsets
|
||||
# cargo when it tries to verify checksums in those files. If we just truncate
|
||||
@ -351,6 +354,7 @@ find src/vendor -name .cargo-checksum.json \
|
||||
%{?rustflags:export RUSTFLAGS="%{rustflags}"}
|
||||
|
||||
DESTDIR=%{buildroot} ./x.py install
|
||||
DESTDIR=%{buildroot} ./x.py install src
|
||||
|
||||
|
||||
# Make sure the shared libraries are in the proper libdir
|
||||
@ -459,7 +463,16 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
||||
%license %{_docdir}/%{name}/html/*.txt
|
||||
|
||||
|
||||
%files src
|
||||
%dir %{rustlibdir}
|
||||
%{rustlibdir}/src
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Aug 31 2017 Josh Stone <jistone@redhat.com> - 1.20.0-1
|
||||
- Update to 1.20.0.
|
||||
- Add a rust-src subpackage.
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (rustc-1.19.0-src.tar.xz) = 4dc0d0848d54ba7355aac7e13b3d0d3f42f05d6cd97ced9dc9e6493ba4686e1398803b567cecf24be0632b11ce1565e8d61b7603ce838b9c32dd0e663d03ba82
|
||||
SHA512 (rustc-1.20.0-src.tar.xz) = 1fcf5f279094e9f8b89b2a46f3fbc11c15609a8bda1e51b82899bd475381c8bb6aaa7ce6fe196fc07e0a36e9d9b9dbaa1c4a6281946cd9f13f3e72fb8cbd3bb2
|
||||
|
@ -1,8 +1,8 @@
|
||||
SHA512 (rustc-1.19.0-src.tar.xz) = 4dc0d0848d54ba7355aac7e13b3d0d3f42f05d6cd97ced9dc9e6493ba4686e1398803b567cecf24be0632b11ce1565e8d61b7603ce838b9c32dd0e663d03ba82
|
||||
SHA512 (rust-1.18.0-aarch64-unknown-linux-gnu.tar.gz) = a1445b84e6215d3b72ed3c33ecfb0467e9abc0eb000eb2059aacf24bed1d8f1de0d2355654d3558b405289db45512c164b45e8b5c19b1420b3eb6f6f17d83872
|
||||
SHA512 (rust-1.18.0-armv7-unknown-linux-gnueabihf.tar.gz) = 7f9783bf396d110da7dce69f5d27501357a6c398296aada1029cc251ac0d97b648a934e8a71c2c4cb2e9fe660e98130624d3bd45543a3fcf4e821f5ee6fda172
|
||||
SHA512 (rust-1.18.0-i686-unknown-linux-gnu.tar.gz) = 8deb0dc9aae392ff50e1e93a0039340db60dbd8838fbeb5bca87961506c21b85961bed37f89d73993e44f8e50c493ef90f7e5b815e459b3650826b97357cad59
|
||||
SHA512 (rust-1.18.0-powerpc64le-unknown-linux-gnu.tar.gz) = 814f07ba103a6358cff0f0a5d55d7b73ce8c1cfda2dbb426f9ace0e043a66eb76797917ebedcd50d60a7ede5e941bb3c77dbf99f5ba92e59238a09c41582edc5
|
||||
SHA512 (rust-1.18.0-powerpc64-unknown-linux-gnu.tar.gz) = 5f6107c70f71e8afec90e5a94d40e27927239e70811a373ef3e0d39191295625e15881ff738bd62ace1b04489c9a33d51f1b4eec2cc923f8d1959dae38de98d8
|
||||
SHA512 (rust-1.18.0-s390x-unknown-linux-gnu.tar.gz) = 291c2aa3107b727176b90f0ff927e72b69c0830261c13805734b6e41cf4979a0000adbfddd69ccfef960b1eb9382694c6084e31adb8c2979df9973f112f3ee12
|
||||
SHA512 (rust-1.18.0-x86_64-unknown-linux-gnu.tar.gz) = 3d5cb71c03f95145539d9f209733ef555520eb826411737c4f168bbcb8ff631a9035e7dc81c42ecf107c5115d1d69ea6620ed95331cefad6de1b9d49f87ce305
|
||||
SHA512 (rustc-1.20.0-src.tar.xz) = 1fcf5f279094e9f8b89b2a46f3fbc11c15609a8bda1e51b82899bd475381c8bb6aaa7ce6fe196fc07e0a36e9d9b9dbaa1c4a6281946cd9f13f3e72fb8cbd3bb2
|
||||
SHA512 (rust-1.19.0-aarch64-unknown-linux-gnu.tar.xz) = 403ff1e6795c623e022813a9cb6f3c246aeeb5f657f233ff96674b1c2fb8146838003de9322817e15cd3099e8a3a2044e92e64a8dde5b3e8f7255f1616699467
|
||||
SHA512 (rust-1.19.0-armv7-unknown-linux-gnueabihf.tar.xz) = dd358f03f9ff23de2b9932504d35518f6340a9dd32984a7597bcf77435435f6101066efd088f2637e75bfd1939cb363ef71796ea6f5f6583899a51190c2a5b64
|
||||
SHA512 (rust-1.19.0-i686-unknown-linux-gnu.tar.xz) = e04b453fd3d5f72cc24211f1dc8a04813b3d07fe088281926bddc5273ddda7702af71010eba5611b911b7049e5f852087c94516792c0e534b15122c55760f7a3
|
||||
SHA512 (rust-1.19.0-powerpc64le-unknown-linux-gnu.tar.xz) = 9bbdd62d2067d1c81b0cfb205f4c51250afe8699752f212a12ad359d9f7b6a85489a459093ab5d1c516d758f676df6eacef1f8d07a5d43b6c794daf1cde33f1c
|
||||
SHA512 (rust-1.19.0-powerpc64-unknown-linux-gnu.tar.xz) = 6697ec98588d092a65b23565d4d29390182089bcc2fe5c9de75ca9020ac5cdfae6e255f6355a828884c4986197917c45b131b29aafd06a67d4d9a5686f3bf975
|
||||
SHA512 (rust-1.19.0-s390x-unknown-linux-gnu.tar.xz) = 61724b6e647d8c6539cc50b47bbef772a65b4d1b041f8fe2411e947bf08535b3227ffda729c3cdb73613723dfc66d73db08b99c173f4fdb6fe510066e9a47fa0
|
||||
SHA512 (rust-1.19.0-x86_64-unknown-linux-gnu.tar.xz) = 807d1b9845f47d515aac54d06274502fb57a4d8ac9caeeaf53bdfd8ae23cc67a151932a9abaa2c0b3ade7124943df91b42442450cbc2a58d2b545db798b45e5d
|
||||
|
Loading…
Reference in New Issue
Block a user