From e70d943ba981d1df4b3f9eeea7979031d33589cc Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 30 Sep 2016 22:04:29 -0700 Subject: [PATCH 01/14] Update to 1.12.0. - Always use --local-rust-root, even for bootstrap binaries. - Remove the rebuild conditional - the build system now figures it out. - Let minidebuginfo do its thing, since metadata is no longer a note. - Let rust build its own compiler-rt builtins again. --- .gitignore | 5 ++ rust-1.11.0-no-bootstrap-download.patch | 14 ---- rust.spec | 87 +++++++++---------------- sources | 9 +-- 4 files changed, 42 insertions(+), 73 deletions(-) delete mode 100644 rust-1.11.0-no-bootstrap-download.patch diff --git a/.gitignore b/.gitignore index 26590cf..ce23abb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,8 @@ /rustc-1.10.0-i686-unknown-linux-gnu.tar.gz /rustc-1.10.0-x86_64-unknown-linux-gnu.tar.gz /rustc-1.10.0-armv7-unknown-linux-gnueabihf.tar.gz +/rustc-1.11.0-aarch64-unknown-linux-gnu.tar.gz +/rustc-1.11.0-armv7-unknown-linux-gnueabihf.tar.gz +/rustc-1.11.0-i686-unknown-linux-gnu.tar.gz +/rustc-1.11.0-x86_64-unknown-linux-gnu.tar.gz +/rustc-1.12.0-src.tar.gz diff --git a/rust-1.11.0-no-bootstrap-download.patch b/rust-1.11.0-no-bootstrap-download.patch deleted file mode 100644 index da5a79a..0000000 --- a/rust-1.11.0-no-bootstrap-download.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- rustc-1.11.0/src/etc/get-stage0.py.no-download 2016-08-24 00:34:03.561598809 -0700 -+++ rustc-1.11.0/src/etc/get-stage0.py 2016-08-24 00:34:08.636555684 -0700 -@@ -31,9 +31,8 @@ def main(triple): - filename = 'rustc-{}-{}.tar.gz'.format(channel, triple) - url = 'https://static.rust-lang.org/dist/{}/{}'.format(date, filename) - dst = dl_dir + '/' + filename -- if os.path.exists(dst): -- os.unlink(dst) -- bootstrap.get(url, dst) -+ if not os.path.exists(dst): -+ bootstrap.get(url, dst) - - stage0_dst = triple + '/stage0' - if os.path.exists(stage0_dst): diff --git a/rust.spec b/rust.spec index 1fa3240..3b6cb64 100644 --- a/rust.spec +++ b/rust.spec @@ -5,24 +5,12 @@ # e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 # or nightly wants some beta-YYYY-MM-DD %bcond_with bootstrap -%global bootstrap_channel 1.10.0 -%global bootstrap_date 2016-07-05 - -# Use "rebuild" when building with a distro rustc of the same version. -# Turn this off when the distro has the prior release, matching bootstrap. -# Note, 1.12 will be able to autodetect this via PR34779. -%bcond_without rebuild - -# The script for minidebuginfo copies symbols and *notes* into a "mini" -# ELF object compressed into the .gnu_debugdata section. This includes our -# relatively large .note.rustc metadata, bloating every library. Eventually -# that metadata should be stripped beforehand -- see rust #23366 and #26764. -# Note, 1.12 will move to unallocated data via PR35409, then can be stripped. -%undefine _include_minidebuginfo +%global bootstrap_channel 1.11.0 +%global bootstrap_date 2016-08-16 Name: rust -Version: 1.11.0 -Release: 3%{?dist} +Version: 1.12.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) @@ -52,10 +40,8 @@ ExclusiveArch: x86_64 i686 armv7hl %global rust_triple %{_target_cpu}-unknown-linux-gnu %endif -Patch1: rust-1.11.0-no-bootstrap-download.patch - # merged for 1.13.0 -Patch2: rust-pr35814-armv7-no-neon.patch +Patch1: rust-pr35814-armv7-no-neon.patch BuildRequires: make BuildRequires: cmake @@ -67,33 +53,17 @@ BuildRequires: python2 BuildRequires: curl %if %without bootstrap -%if %with rebuild BuildRequires: %{name} < %{version}-%{release} -BuildRequires: %{name} >= %{version} -%else -BuildRequires: %{name} < %{version} BuildRequires: %{name} >= %{bootstrap_channel} -%endif -%endif - -# make check: src/test/run-pass/wait-forked-but-failed-child.rs -BuildRequires: /usr/bin/ps - -# Rust started using cmake for its bundled compiler-rt, but this requires -# llvm-static to be installed. But then llvm-config starts printing flags -# for static linkage, with no way to force it shared. -# -# For now, we'll bypass all that and just use the distro build. Then in the -# next release, Rust is moving toward a true fork of these builtins, with the -# eventual goal of rewriting them in Rust proper. -BuildRequires: compiler-rt -Provides: bundled(compiler-rt) = 3.8 -%ifarch armv7hl -%global clang_builtins %{_libdir}/clang/3.8.0/lib/libclang_rt.builtins-armhf.a +%global local_rust_root %{_prefix} %else -%global clang_builtins %{_libdir}/clang/3.8.0/lib/libclang_rt.builtins-%{_target_cpu}.a +%global bootstrap_root rustc-%{bootstrap_channel}-%{rust_triple} +%global local_rust_root %{_builddir}/%{rustc_package}/%{bootstrap_root}/rustc %endif +# make check needs "ps" for src/test/run-pass/wait-forked-but-failed-child.rs +BuildRequires: procps-ng + # TODO: work on unbundling these! Provides: bundled(hoedown) = 3.0.5 Provides: bundled(jquery) = 2.1.4 @@ -147,12 +117,16 @@ its standard library. %prep %setup -q -n %{rustc_package} -%patch1 -p1 -b .no-download -%patch2 -p1 -b .no-neon +%if %with bootstrap +find %{sources} -name '%{bootstrap_root}.tar.gz' -exec tar -xvzf '{}' ';' +test -f '%{local_rust_root}/bin/rustc' +%endif + +%patch1 -p1 -b .no-neon # unbundle -rm -rf src/llvm/ src/jemalloc/ -rm -rf src/compiler-rt/ +rm -rf src/jemalloc/ +rm -rf src/llvm/ # extract bundled licenses for packaging cp src/rt/hoedown/LICENSE src/rt/hoedown/LICENSE-hoedown @@ -179,25 +153,17 @@ sed -i.nomips -e '/target=mips/,+1s/^/# unsupported /' \ sed -i.libdir -e '/^HLIB_RELATIVE/s/lib$/$$(CFG_LIBDIR_RELATIVE)/' mk/main.mk %endif -%if %with bootstrap -mkdir -p dl/ -cp -t dl/ %{?SOURCE1} %{?SOURCE2} %{?SOURCE3} %{?SOURCE4} -%endif - %build %configure --disable-option-checking \ --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ - %{!?with_bootstrap:--enable-local-rust --local-rust-root=%{_prefix} %{?with_rebuild:--enable-local-rebuild}} \ + --enable-local-rust --local-rust-root=%{local_rust_root} \ --llvm-root=%{_prefix} --disable-codegen-tests \ --disable-jemalloc \ --disable-rpath \ --enable-debuginfo \ --release-channel=%{channel} -# Bypass the compiler-rt build -- see above. -cp %{clang_builtins} ./%{rust_triple}/rt/libcompiler-rt.a - %make_build VERBOSE=1 @@ -213,6 +179,10 @@ find %{buildroot}/%{_libdir}/rustlib/ -type f -name '*.so' -exec rm -v '{}' '+' # The remaining shared libraries should be executable for debuginfo extraction. find %{buildroot}/%{_libdir}/ -type f -name '*.so' -exec chmod -v +x '{}' '+' +# They also don't need the .rustc metadata anymore, so they won't support linking. +# (but direct section removal breaks dynamic symbols -- leave it for now...) +#find %{buildroot}/%{_libdir}/ -type f -name '*.so' -exec objcopy -R .rustc '{}' ';' + # FIXME: __os_install_post will strip the rlibs # -- should we find a way to preserve debuginfo? @@ -224,7 +194,7 @@ rm -f %{buildroot}/%{_docdir}/%{name}/LICENSE-MIT # Sanitize the HTML documentation find %{buildroot}/%{_docdir}/%{name}/html -empty -delete -find %{buildroot}/%{_docdir}/%{name}/html -type f -exec chmod -v -x '{}' '+' +find %{buildroot}/%{_docdir}/%{name}/html -type f -exec chmod -x '{}' '+' # Move rust-gdb's python scripts so they're noarch mkdir -p %{buildroot}/%{_datadir}/%{name} @@ -273,6 +243,13 @@ make check-lite VERBOSE=1 -k || echo "make check-lite exited with code $?" %changelog +* Fri Sep 30 2016 Josh Stone - 1.12.0-1 +- Update to 1.12.0. +- Always use --local-rust-root, even for bootstrap binaries. +- Remove the rebuild conditional - the build system now figures it out. +- Let minidebuginfo do its thing, since metadata is no longer a note. +- Let rust build its own compiler-rt builtins again. + * Sat Sep 03 2016 Josh Stone - 1.11.0-3 - Rebuild without bootstrap binaries. diff --git a/sources b/sources index 1035e29..a423b9d 100644 --- a/sources +++ b/sources @@ -1,4 +1,5 @@ -bdbd8fa629208c94496adf40c68746a9 rustc-1.11.0-src.tar.gz -059dbecdf8a7360f04450487a19be863 rustc-1.10.0-i686-unknown-linux-gnu.tar.gz -eb49a590e9c30f77bb15741488ef2c2f rustc-1.10.0-x86_64-unknown-linux-gnu.tar.gz -9a7a0bb568cfd3f3d5618e2cac5804ce rustc-1.10.0-armv7-unknown-linux-gnueabihf.tar.gz +2beae9a9bd441553e979e10464829a97 rustc-1.11.0-aarch64-unknown-linux-gnu.tar.gz +7386f1fae4b9e9ef95e281ea27f1446a rustc-1.11.0-armv7-unknown-linux-gnueabihf.tar.gz +932c698c242238a68530c2c15fd0b810 rustc-1.11.0-i686-unknown-linux-gnu.tar.gz +b83d7a1a90c2d80bef97a518022948c8 rustc-1.11.0-x86_64-unknown-linux-gnu.tar.gz +37ee9fc76712e4e94e14947c160bd6d0 rustc-1.12.0-src.tar.gz From 1702b2ce16577fa3e924140cfc24a37984795f0c Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sat, 1 Oct 2016 11:10:13 -0700 Subject: [PATCH 02/14] Protect .rustc from rpm stripping. It should be fine to strip this, even desirable, but it's causing dynamic linking issues. --- rust.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 3b6cb64..4a3464e 100644 --- a/rust.spec +++ b/rust.spec @@ -8,9 +8,22 @@ %global bootstrap_channel 1.11.0 %global bootstrap_date 2016-08-16 +# Rust metadata used to be an allocated note (.note.rustc) and minidebuginfo +# caused an undesirable duplication, leaving the note AND putting it into +# .gnu_debugdata, so we disabled minidebuginfo. +# +# Rust 1.12 metadata is now unallocated data (.rustc), and in theory it should +# be fine to strip this entirely, since we don't want to expose Rust's unstable +# ABI for linking. However, while this works manually for me, when paired with +# rpm stripping it makes the libraries fail to find their own dynamic symbols. +# So for now, we'll leave .rustc alone and only let rpm-build strip debuginfo. +# (This probably deserves a bug report against rpm-build/binutils/elfutils...) +%global _find_debuginfo_opts -g +%undefine _include_minidebuginfo + Name: rust Version: 1.12.0 -Release: 1%{?dist} +Release: 2%{?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) @@ -243,6 +256,9 @@ make check-lite VERBOSE=1 -k || echo "make check-lite exited with code $?" %changelog +* Sat Oct 01 2016 Josh Stone - 1.12.0-2 +- Protect .rustc from rpm stripping. + * Fri Sep 30 2016 Josh Stone - 1.12.0-1 - Update to 1.12.0. - Always use --local-rust-root, even for bootstrap binaries. From 3260087dc0c3327f1c110b178eda0aa3def4ec7f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 4 Oct 2016 00:44:59 -0700 Subject: [PATCH 03/14] Relax the self requirement to just version The koschei app was complaining of unsatisfied dependencies when I had strictly "< %{version}-%{release}". Just "<= %{version}" should work. --- rust.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 4a3464e..b19dcd4 100644 --- a/rust.spec +++ b/rust.spec @@ -66,7 +66,7 @@ BuildRequires: python2 BuildRequires: curl %if %without bootstrap -BuildRequires: %{name} < %{version}-%{release} +BuildRequires: %{name} <= %{version} BuildRequires: %{name} >= %{bootstrap_channel} %global local_rust_root %{_prefix} %else From 4d5af3f6337c612a175b737ab56fbf93277d16e1 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 6 Oct 2016 18:49:52 -0700 Subject: [PATCH 04/14] Bootstrap aarch64. - Use jemalloc's MALLOC_CONF to work around #36944. - Apply pr36933 to really disable armv7hl NEON. --- rust-pr36933-less-neon-again.patch | 30 ++++++++++++++++++++++++++++++ rust.spec | 26 ++++++++++++++++++++++---- 2 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 rust-pr36933-less-neon-again.patch diff --git a/rust-pr36933-less-neon-again.patch b/rust-pr36933-less-neon-again.patch new file mode 100644 index 0000000..42b2b82 --- /dev/null +++ b/rust-pr36933-less-neon-again.patch @@ -0,0 +1,30 @@ +commit 1a4192804518199623fb88bf43bde69d6b0203cb (from a5dac7a2af3ee444817eb7bfbba3539be8c06cf1) +Merge: a5dac7a2af3e 4625642211b9 +Author: bors +Date: Tue Oct 4 13:23:09 2016 -0700 + + Auto merge of #36933 - alexcrichton:less-neon-again, r=eddyb + + rustc: Try again to disable NEON on armv7 linux + + This is a follow-up to #35814 which apparently didn't disable it hard enough. It + looks like LLVM's default armv7 target enables NEON so we'd otherwise have to + pass `-neon`, but we're already enabling armv7 with `+v7` supposedly, so let's + try just telling LLVM that the armv7 target is arm and then enable features + selectively. + + Closes #36913 + +diff --git a/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs b/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs +index 1abf8b0b69a2..a6d73ddb1835 100644 +--- a/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs ++++ b/src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs +@@ -24,7 +24,7 @@ pub fn target() -> TargetResult { + + options: TargetOptions { + // Info about features at https://wiki.debian.org/ArmHardFloatPort +- features: "+v7,+vfp3,+d16,+thumb2".to_string(), ++ features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(), + cpu: "generic".to_string(), + max_atomic_width: 64, + .. base diff --git a/rust.spec b/rust.spec index b19dcd4..0dc7cc7 100644 --- a/rust.spec +++ b/rust.spec @@ -4,7 +4,7 @@ # 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 -%bcond_with bootstrap +%bcond_without bootstrap %global bootstrap_channel 1.11.0 %global bootstrap_date 2016-08-16 @@ -23,7 +23,7 @@ Name: rust Version: 1.12.0 -Release: 2%{?dist} +Release: 3%{?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) @@ -41,12 +41,12 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}-src.tar.gz Source1: %{bootstrap_base}-x86_64-unknown-linux-gnu.tar.gz Source2: %{bootstrap_base}-i686-unknown-linux-gnu.tar.gz Source3: %{bootstrap_base}-armv7-unknown-linux-gnueabihf.tar.gz -#Source4: %{bootstrap_base}-aarch64-unknown-linux-gnu.tar.gz +Source4: %{bootstrap_base}-aarch64-unknown-linux-gnu.tar.gz %endif # Only x86_64 and i686 are Tier 1 platforms at this time. # https://doc.rust-lang.org/stable/book/getting-started.html#tier-1 -ExclusiveArch: x86_64 i686 armv7hl +ExclusiveArch: x86_64 i686 armv7hl aarch64 %ifarch armv7hl %global rust_triple armv7-unknown-linux-gnueabihf %else @@ -56,6 +56,9 @@ ExclusiveArch: x86_64 i686 armv7hl # merged for 1.13.0 Patch1: rust-pr35814-armv7-no-neon.patch +# merged for 1.14.0 +Patch2: rust-pr36933-less-neon-again.patch + BuildRequires: make BuildRequires: cmake BuildRequires: gcc @@ -136,6 +139,7 @@ test -f '%{local_rust_root}/bin/rustc' %endif %patch1 -p1 -b .no-neon +%patch2 -p1 -b .less-neon # unbundle rm -rf src/jemalloc/ @@ -168,6 +172,15 @@ sed -i.libdir -e '/^HLIB_RELATIVE/s/lib$/$$(CFG_LIBDIR_RELATIVE)/' mk/main.mk %build + +%ifarch aarch64 +%if %with bootstrap +# Upstream binaries have a 4k-paged jemalloc, which breaks with Fedora 64k pages. +# https://github.com/rust-lang/rust/issues/36994 +export MALLOC_CONF=lg_dirty_mult:-1 +%endif +%endif + %configure --disable-option-checking \ --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ --enable-local-rust --local-rust-root=%{local_rust_root} \ @@ -256,6 +269,11 @@ make check-lite VERBOSE=1 -k || echo "make check-lite exited with code $?" %changelog +* Thu Oct 06 2016 Josh Stone - 1.12.0-3 +- Bootstrap aarch64. +- Use jemalloc's MALLOC_CONF to work around #36944. +- Apply pr36933 to really disable armv7hl NEON. + * Sat Oct 01 2016 Josh Stone - 1.12.0-2 - Protect .rustc from rpm stripping. From 41b455a0d7528f8f7dced6264f56acb95883a1ef Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 7 Oct 2016 00:43:38 -0700 Subject: [PATCH 05/14] Rebuild without bootstrap binaries. --- rust.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 0dc7cc7..6b1aa31 100644 --- a/rust.spec +++ b/rust.spec @@ -4,7 +4,7 @@ # 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 -%bcond_without bootstrap +%bcond_with bootstrap %global bootstrap_channel 1.11.0 %global bootstrap_date 2016-08-16 @@ -23,7 +23,7 @@ Name: rust Version: 1.12.0 -Release: 3%{?dist} +Release: 4%{?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) @@ -269,6 +269,9 @@ make check-lite VERBOSE=1 -k || echo "make check-lite exited with code $?" %changelog +* Fri Oct 07 2016 Josh Stone - 1.12.0-4 +- Rebuild without bootstrap binaries. + * Thu Oct 06 2016 Josh Stone - 1.12.0-3 - Bootstrap aarch64. - Use jemalloc's MALLOC_CONF to work around #36944. From b7f305b4991a24ce95264c5de11f07b4c2b26612 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 7 Oct 2016 22:20:14 -0700 Subject: [PATCH 06/14] Rebuild with fixed eu-strip (rhbz1380961) --- rust.spec | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/rust.spec b/rust.spec index 6b1aa31..5644501 100644 --- a/rust.spec +++ b/rust.spec @@ -8,22 +8,19 @@ %global bootstrap_channel 1.11.0 %global bootstrap_date 2016-08-16 -# Rust metadata used to be an allocated note (.note.rustc) and minidebuginfo -# caused an undesirable duplication, leaving the note AND putting it into -# .gnu_debugdata, so we disabled minidebuginfo. -# # Rust 1.12 metadata is now unallocated data (.rustc), and in theory it should # be fine to strip this entirely, since we don't want to expose Rust's unstable -# ABI for linking. However, while this works manually for me, when paired with -# rpm stripping it makes the libraries fail to find their own dynamic symbols. -# So for now, we'll leave .rustc alone and only let rpm-build strip debuginfo. -# (This probably deserves a bug report against rpm-build/binutils/elfutils...) +# ABI for linking. However, eu-strip was then clobbering .dynsym when it tried +# to remove the rust_metadata symbol referencing .rustc (rhbz1380961). +# So for unfixed elfutils, we'll leave .rustc alone and only strip debuginfo. +%if 0%{?fedora} < 26 %global _find_debuginfo_opts -g %undefine _include_minidebuginfo +%endif Name: rust Version: 1.12.0 -Release: 4%{?dist} +Release: 5%{?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) @@ -206,8 +203,10 @@ find %{buildroot}/%{_libdir}/rustlib/ -type f -name '*.so' -exec rm -v '{}' '+' find %{buildroot}/%{_libdir}/ -type f -name '*.so' -exec chmod -v +x '{}' '+' # They also don't need the .rustc metadata anymore, so they won't support linking. -# (but direct section removal breaks dynamic symbols -- leave it for now...) -#find %{buildroot}/%{_libdir}/ -type f -name '*.so' -exec objcopy -R .rustc '{}' ';' +# (but this needs the rhbz1380961 fix, or else eu-strip will clobber .dynsym) +%if 0%{?fedora} >= 26 +find %{buildroot}/%{_libdir}/ -type f -name '*.so' -exec objcopy -R .rustc '{}' ';' +%endif # FIXME: __os_install_post will strip the rlibs # -- should we find a way to preserve debuginfo? @@ -269,6 +268,9 @@ make check-lite VERBOSE=1 -k || echo "make check-lite exited with code $?" %changelog +* Fri Oct 07 2016 Josh Stone - 1.12.0-5 +- Rebuild with fixed eu-strip (rhbz1380961) + * Fri Oct 07 2016 Josh Stone - 1.12.0-4 - Rebuild without bootstrap binaries. From 4b827922a2ade131724fb7a39eaa992b5919e053 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 13 Oct 2016 10:47:06 -0700 Subject: [PATCH 07/14] call check-summary manually after test failures --- rust.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 5644501..43f573a 100644 --- a/rust.spec +++ b/rust.spec @@ -230,7 +230,7 @@ mv -v %{buildroot}/%{_libdir}/rustlib/etc %{buildroot}/%{_datadir}/%{name}/ # Note, many of the tests execute in parallel threads, # so it's better not to use a parallel make here. # The results are not stable on koji, so mask errors and just log it. -make check-lite VERBOSE=1 -k || echo "make check-lite exited with code $?" +make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : %post -p /sbin/ldconfig From ee0eb2e7ebb9a1a66ea19a996923697dc701ebfb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 13 Oct 2016 17:19:21 -0700 Subject: [PATCH 08/14] Rebuild with llvm-static, preparing for 3.9 --- rust.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 43f573a..0bad936 100644 --- a/rust.spec +++ b/rust.spec @@ -20,7 +20,7 @@ Name: rust Version: 1.12.0 -Release: 5%{?dist} +Release: 6%{?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) @@ -60,7 +60,7 @@ BuildRequires: make BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: llvm-devel +BuildRequires: llvm-devel llvm-static BuildRequires: zlib-devel BuildRequires: python2 BuildRequires: curl @@ -268,6 +268,9 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : %changelog +* Thu Oct 13 2016 Josh Stone - 1.12.0-6 +- Rebuild with llvm-static, preparing for 3.9 + * Fri Oct 07 2016 Josh Stone - 1.12.0-5 - Rebuild with fixed eu-strip (rhbz1380961) From 171389492c3043754554477eb9e3e68bbf22a1fb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 13 Oct 2016 18:26:06 -0700 Subject: [PATCH 09/14] Link ffi as a workaround for rust#34486 --- rust.spec | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 0bad936..77bd4cb 100644 --- a/rust.spec +++ b/rust.spec @@ -8,6 +8,11 @@ %global bootstrap_channel 1.11.0 %global bootstrap_date 2016-08-16 +# We generally don't want llvm-static present at all, since llvm-config will +# make us link statically. But we can opt in, e.g. to aid LLVM rebases. +%bcond_without llvm_static + + # Rust 1.12 metadata is now unallocated data (.rustc), and in theory it should # be fine to strip this entirely, since we don't want to expose Rust's unstable # ABI for linking. However, eu-strip was then clobbering .dynsym when it tried @@ -60,11 +65,20 @@ BuildRequires: make BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: llvm-devel llvm-static +BuildRequires: llvm-devel BuildRequires: zlib-devel BuildRequires: python2 BuildRequires: curl +%if %with llvm_static +BuildRequires: llvm-static +BuildRequires: libffi-devel +%else +# Make sure llvm-config doesn't see it. +BuildConflicts: llvm-static +%endif + + %if %without bootstrap BuildRequires: %{name} <= %{version} BuildRequires: %{name} >= %{bootstrap_channel} @@ -167,6 +181,13 @@ sed -i.nomips -e '/target=mips/,+1s/^/# unsupported /' \ sed -i.libdir -e '/^HLIB_RELATIVE/s/lib$/$$(CFG_LIBDIR_RELATIVE)/' mk/main.mk %endif +%if %with llvm_static +# Static linking to distro LLVM needs to add -lffi +# https://github.com/rust-lang/rust/issues/34486 +sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \ + src/librustc_llvm/lib.rs +%endif + %build From b233f150aec57635efc5e27de8ab2e292e2f2cec Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 14 Oct 2016 00:40:50 -0700 Subject: [PATCH 10/14] Rebuild with LLVM 3.9. --- rust.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 77bd4cb..b71e470 100644 --- a/rust.spec +++ b/rust.spec @@ -10,7 +10,7 @@ # We generally don't want llvm-static present at all, since llvm-config will # make us link statically. But we can opt in, e.g. to aid LLVM rebases. -%bcond_without llvm_static +%bcond_with llvm_static # Rust 1.12 metadata is now unallocated data (.rustc), and in theory it should @@ -25,7 +25,7 @@ Name: rust Version: 1.12.0 -Release: 6%{?dist} +Release: 7%{?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) @@ -289,6 +289,9 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : %changelog +* Fri Oct 14 2016 Josh Stone - 1.12.0-7 +- Rebuild with LLVM 3.9. + * Thu Oct 13 2016 Josh Stone - 1.12.0-6 - Rebuild with llvm-static, preparing for 3.9 From 1cdcdee3ca806f55563ea103fd3c12340cd3af98 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 14 Oct 2016 10:15:40 -0700 Subject: [PATCH 11/14] Add ncurses-devel for llvm-config's -ltinfo. --- rust.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust.spec b/rust.spec index b71e470..6be3e9e 100644 --- a/rust.spec +++ b/rust.spec @@ -66,6 +66,7 @@ BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: llvm-devel +BuildRequires: ncurses-devel BuildRequires: zlib-devel BuildRequires: python2 BuildRequires: curl @@ -291,6 +292,7 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : %changelog * Fri Oct 14 2016 Josh Stone - 1.12.0-7 - Rebuild with LLVM 3.9. +- Add ncurses-devel for llvm-config's -ltinfo. * Thu Oct 13 2016 Josh Stone - 1.12.0-6 - Rebuild with llvm-static, preparing for 3.9 From 6050c3a1b2df417ed4b51ec830477506078f4dee Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 20 Oct 2016 19:09:42 -0700 Subject: [PATCH 12/14] Update to 1.12.1. --- rust-boot-1.12.1-from-1.12.0.diff | 299 ++++++++++++++++++++++++++++++ rust.spec | 17 +- 2 files changed, 312 insertions(+), 4 deletions(-) create mode 100644 rust-boot-1.12.1-from-1.12.0.diff diff --git a/rust-boot-1.12.1-from-1.12.0.diff b/rust-boot-1.12.1-from-1.12.0.diff new file mode 100644 index 0000000..86b3a26 --- /dev/null +++ b/rust-boot-1.12.1-from-1.12.0.diff @@ -0,0 +1,299 @@ +diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock +index d52577e..36b94e4 100644 +--- a/src/bootstrap/Cargo.lock ++++ b/src/bootstrap/Cargo.lock +@@ -157,3 +157,24 @@ name = "winapi-build" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + ++[metadata] ++"checksum aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2b3fb52b09c1710b961acb35390d514be82e4ac96a9969a8e38565a29b878dc9" ++"checksum cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "dfcf5bcece56ef953b8ea042509e9dcbdfe97820b7e20d86beb53df30ed94978" ++"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922" ++"checksum gcc 0.3.31 (git+https://github.com/alexcrichton/gcc-rs)" = "" ++"checksum gcc 0.3.31 (registry+https://github.com/rust-lang/crates.io-index)" = "cfe877476e53690ebb0ce7325d0bf43e198d9500291b54b3c65e518de5039b07" ++"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" ++"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" ++"checksum libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "55f3730be7e803cf350d32061958171731c2395831fbd67a61083782808183e0" ++"checksum md5 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5539a8dee9b4ae308c9c406a379838b435a8f2c84cf9fedc6d5a576be9888db" ++"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" ++"checksum num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "51fedae97a05f7353612fe017ab705a37e6db8f4d67c5c6fe739a9e70d6eed09" ++"checksum regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)" = "56b7ee9f764ecf412c6e2fff779bca4b22980517ae335a21aeaf4e32625a5df2" ++"checksum regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "31040aad7470ad9d8c46302dcffba337bb4289ca5da2e3cd6e37b64109a85199" ++"checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" ++"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" ++"checksum thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "55dd963dbaeadc08aa7266bf7f91c3154a7805e32bb94b820b769d2ef3b4744d" ++"checksum toml 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "fcd27a04ca509aff336ba5eb2abc58d456f52c4ff64d9724d88acb85ead560b6" ++"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" ++"checksum winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4dfaaa8fbdaa618fa6914b59b2769d690dd7521920a18d84b42d254678dd5fd4" ++"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs +index 0af6082..b40dbfd 100644 +--- a/src/bootstrap/lib.rs ++++ b/src/bootstrap/lib.rs +@@ -543,6 +543,10 @@ impl Build { + .arg("-j").arg(self.jobs().to_string()) + .arg("--target").arg(target); + ++ // FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005 ++ // Force cargo to output binaries with disambiguating hashes in the name ++ cargo.env("__CARGO_DEFAULT_LIB_METADATA", "1"); ++ + let stage; + if compiler.stage == 0 && self.local_rebuild { + // Assume the local-rebuild rustc already has stage1 features. +diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs +index bb7c971..9bba6cd 100644 +--- a/src/libcore/cmp.rs ++++ b/src/libcore/cmp.rs +@@ -699,38 +699,29 @@ mod impls { + + ord_impl! { char usize u8 u16 u32 u64 isize i8 i16 i32 i64 } + +- // Note: This macro is a temporary hack that can be remove once we are building with a compiler +- // that supports `!` +- macro_rules! not_stage0 { +- () => { +- #[unstable(feature = "never_type", issue = "35121")] +- impl PartialEq for ! { +- fn eq(&self, _: &!) -> bool { +- *self +- } +- } ++ #[unstable(feature = "never_type", issue = "35121")] ++ impl PartialEq for ! { ++ fn eq(&self, _: &!) -> bool { ++ *self ++ } ++ } + +- #[unstable(feature = "never_type", issue = "35121")] +- impl Eq for ! {} ++ #[unstable(feature = "never_type", issue = "35121")] ++ impl Eq for ! {} + +- #[unstable(feature = "never_type", issue = "35121")] +- impl PartialOrd for ! { +- fn partial_cmp(&self, _: &!) -> Option { +- *self +- } +- } +- +- #[unstable(feature = "never_type", issue = "35121")] +- impl Ord for ! { +- fn cmp(&self, _: &!) -> Ordering { +- *self +- } +- } ++ #[unstable(feature = "never_type", issue = "35121")] ++ impl PartialOrd for ! { ++ fn partial_cmp(&self, _: &!) -> Option { ++ *self + } + } + +- #[cfg(not(stage0))] +- not_stage0!(); ++ #[unstable(feature = "never_type", issue = "35121")] ++ impl Ord for ! { ++ fn cmp(&self, _: &!) -> Ordering { ++ *self ++ } ++ } + + // & pointers + +diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs +index dbd715c..7688da9 100644 +--- a/src/libcore/fmt/mod.rs ++++ b/src/libcore/fmt/mod.rs +@@ -1363,28 +1363,19 @@ macro_rules! fmt_refs { + + fmt_refs! { Debug, Display, Octal, Binary, LowerHex, UpperHex, LowerExp, UpperExp } + +-// Note: This macro is a temporary hack that can be remove once we are building with a compiler +-// that supports `!` +-macro_rules! not_stage0 { +- () => { +- #[unstable(feature = "never_type", issue = "35121")] +- impl Debug for ! { +- fn fmt(&self, _: &mut Formatter) -> Result { +- *self +- } +- } +- +- #[unstable(feature = "never_type", issue = "35121")] +- impl Display for ! { +- fn fmt(&self, _: &mut Formatter) -> Result { +- *self +- } +- } ++#[unstable(feature = "never_type", issue = "35121")] ++impl Debug for ! { ++ fn fmt(&self, _: &mut Formatter) -> Result { ++ *self + } + } + +-#[cfg(not(stage0))] +-not_stage0!(); ++#[unstable(feature = "never_type", issue = "35121")] ++impl Display for ! { ++ fn fmt(&self, _: &mut Formatter) -> Result { ++ *self ++ } ++} + + #[stable(feature = "rust1", since = "1.0.0")] + impl Debug for bool { +diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs +index 7831464..e2ce8ae 100644 +--- a/src/libcore/lib.rs ++++ b/src/libcore/lib.rs +@@ -62,8 +62,6 @@ + #![deny(missing_debug_implementations)] + #![cfg_attr(not(stage0), deny(warnings))] + +-#![cfg_attr(stage0, allow(unused_attributes))] +- + #![feature(allow_internal_unstable)] + #![feature(asm)] + #![feature(associated_type_defaults)] +@@ -87,9 +85,7 @@ + #![feature(staged_api)] + #![feature(unboxed_closures)] + #![feature(question_mark)] +- +-// NOTE: remove the cfg_attr next snapshot +-#![cfg_attr(not(stage0), feature(never_type))] ++#![feature(never_type)] + + #[macro_use] + mod macros; +diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs +index fdae8f6..bd0c2f5 100644 +--- a/src/libpanic_unwind/gcc.rs ++++ b/src/libpanic_unwind/gcc.rs +@@ -264,30 +264,6 @@ unsafe fn find_eh_action(context: *mut uw::_Unwind_Context) -> EHAction { + eh::find_eh_action(lsda, &eh_context) + } + +-// *** Delete after a new snapshot *** +-#[cfg(all(stage0, any(target_os = "ios", not(target_arch = "arm"))))] +-#[lang = "eh_personality_catch"] +-#[no_mangle] +-pub unsafe extern "C" fn rust_eh_personality_catch(version: c_int, +- actions: uw::_Unwind_Action, +- exception_class: uw::_Unwind_Exception_Class, +- ue_header: *mut uw::_Unwind_Exception, +- context: *mut uw::_Unwind_Context) +- -> uw::_Unwind_Reason_Code { +- rust_eh_personality(version, actions, exception_class, ue_header, context) +-} +- +-// *** Delete after a new snapshot *** +-#[cfg(all(stage0, target_arch = "arm", not(target_os = "ios")))] +-#[lang = "eh_personality_catch"] +-#[no_mangle] +-pub unsafe extern "C" fn rust_eh_personality_catch(state: uw::_Unwind_State, +- ue_header: *mut uw::_Unwind_Exception, +- context: *mut uw::_Unwind_Context) +- -> uw::_Unwind_Reason_Code { +- rust_eh_personality(state, ue_header, context) +-} +- + // See docs in the `unwind` module. + #[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))] + #[lang = "eh_unwind_resume"] +diff --git a/src/libpanic_unwind/seh64_gnu.rs b/src/libpanic_unwind/seh64_gnu.rs +index 3642e24..e6d3920 100644 +--- a/src/libpanic_unwind/seh64_gnu.rs ++++ b/src/libpanic_unwind/seh64_gnu.rs +@@ -81,21 +81,6 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box { + // This is considered acceptable, because the behavior of throwing exceptions + // through a C ABI boundary is undefined. + +-// *** Delete after a new snapshot *** +-#[cfg(stage0)] +-#[lang = "eh_personality_catch"] +-#[cfg(not(test))] +-unsafe extern "C" fn rust_eh_personality_catch(exceptionRecord: *mut c::EXCEPTION_RECORD, +- establisherFrame: c::LPVOID, +- contextRecord: *mut c::CONTEXT, +- dispatcherContext: *mut c::DISPATCHER_CONTEXT) +- -> c::EXCEPTION_DISPOSITION { +- rust_eh_personality(exceptionRecord, +- establisherFrame, +- contextRecord, +- dispatcherContext) +-} +- + #[lang = "eh_personality"] + #[cfg(not(test))] + unsafe extern "C" fn rust_eh_personality(exceptionRecord: *mut c::EXCEPTION_RECORD, +diff --git a/src/rustc/Cargo.lock b/src/rustc/Cargo.lock +index 0b2287c..8cc22f3 100644 +--- a/src/rustc/Cargo.lock ++++ b/src/rustc/Cargo.lock +@@ -399,3 +399,5 @@ dependencies = [ + "serialize 0.0.0", + ] + ++[metadata] ++"checksum gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)" = "3da3a2cbaeb01363c8e3704fd9fd0eb2ceb17c6f27abd4c1ef040fb57d20dc79" +diff --git a/src/rustc/std_shim/Cargo.lock b/src/rustc/std_shim/Cargo.lock +index 70aef55..d47b541 100644 +--- a/src/rustc/std_shim/Cargo.lock ++++ b/src/rustc/std_shim/Cargo.lock +@@ -118,3 +118,5 @@ dependencies = [ + "libc 0.0.0", + ] + ++[metadata] ++"checksum gcc 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)" = "806e63121fbf30760b060a5fc2d1e9f47e1bd356d183e8870367c6c12cc9d5ed" +diff --git a/src/stage0.txt b/src/stage0.txt +index b07347c..9c2fc4d 100644 +--- a/src/stage0.txt ++++ b/src/stage0.txt +@@ -12,6 +12,6 @@ + # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was + # released on `$date` + +-rustc: 1.11.0-2016-08-16 +-rustc_key: 39b92f95 +-cargo: nightly-2016-07-05 ++rustc: 1.12.0-2016-09-27 ++rustc_key: 40393716 ++cargo: nightly-2016-08-21 +diff --git a/src/tools/compiletest/Cargo.lock b/src/tools/compiletest/Cargo.lock +index 24c8b20..7556978 100644 +--- a/src/tools/compiletest/Cargo.lock ++++ b/src/tools/compiletest/Cargo.lock +@@ -80,3 +80,13 @@ name = "utf8-ranges" + version = "0.1.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + ++[metadata] ++"checksum aho-corasick 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "67077478f0a03952bed2e6786338d400d40c25e9836e08ad50af96607317fd03" ++"checksum env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aba65b63ffcc17ffacd6cf5aa843da7c5a25e3bd4bbe0b7def8b214e411250e5" ++"checksum libc 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "95ca44454e7cfe7f8a2095a41a10c79d96a177c0b1672cbf1a30d901a9c16ee5" ++"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054" ++"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" ++"checksum mempool 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f997e65fe3eb7a6f8557a7a477de9ed5c511850c85363d13f7b0145b526ed36a" ++"checksum regex 0.1.62 (registry+https://github.com/rust-lang/crates.io-index)" = "22bdab319e36735729aa280752c9293b29ec0053a6810679d697515f80a986fe" ++"checksum regex-syntax 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "841591b1e05609a643e3b4d0045fce04f701daba7151ddcd3ad47b080693d5a9" ++"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" +diff --git a/src/tools/linkchecker/Cargo.lock b/src/tools/linkchecker/Cargo.lock +index ed5fe08..d71df6d 100644 +--- a/src/tools/linkchecker/Cargo.lock ++++ b/src/tools/linkchecker/Cargo.lock +@@ -42,3 +42,9 @@ dependencies = [ + "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + ] + ++[metadata] ++"checksum idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1053236e00ce4f668aeca4a769a09b3bf5a682d802abd6f3cb39374f6b162c11" ++"checksum matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "15305656809ce5a4805b1ff2946892810992197ce1270ff79baded852187942e" ++"checksum unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c1f7ceb96afdfeedee42bade65a0d585a6a0106f681b6749c8ff4daa8df30b3f" ++"checksum unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "26643a2f83bac55f1976fb716c10234485f9202dcd65cfbdf9da49867b271172" ++"checksum url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afe9ec54bc4db14bc8744b7fed060d785ac756791450959b2248443319d5b119" diff --git a/rust.spec b/rust.spec index 6be3e9e..e8d4213 100644 --- a/rust.spec +++ b/rust.spec @@ -18,14 +18,14 @@ # ABI for linking. However, eu-strip was then clobbering .dynsym when it tried # to remove the rust_metadata symbol referencing .rustc (rhbz1380961). # So for unfixed elfutils, we'll leave .rustc alone and only strip debuginfo. -%if 0%{?fedora} < 26 +%if 0%{?fedora} < 25 %global _find_debuginfo_opts -g %undefine _include_minidebuginfo %endif Name: rust -Version: 1.12.0 -Release: 7%{?dist} +Version: 1.12.1 +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) @@ -61,6 +61,11 @@ Patch1: rust-pr35814-armv7-no-neon.patch # merged for 1.14.0 Patch2: rust-pr36933-less-neon-again.patch +# temporary measure for building 1.12.1 from 1.12.0 +# https://users.rust-lang.org/t/bootstrapping-1-12-1-from-1-12-0/7715 +# https://gist.github.com/brson/ff61fef70ac30ed4a33672e2b230e7e1 +Patch3: rust-boot-1.12.1-from-1.12.0.diff + BuildRequires: make BuildRequires: cmake BuildRequires: gcc @@ -152,6 +157,7 @@ test -f '%{local_rust_root}/bin/rustc' %patch1 -p1 -b .no-neon %patch2 -p1 -b .less-neon +%patch3 -p1 -b .bootstrap # unbundle rm -rf src/jemalloc/ @@ -226,7 +232,7 @@ find %{buildroot}/%{_libdir}/ -type f -name '*.so' -exec chmod -v +x '{}' '+' # They also don't need the .rustc metadata anymore, so they won't support linking. # (but this needs the rhbz1380961 fix, or else eu-strip will clobber .dynsym) -%if 0%{?fedora} >= 26 +%if 0%{?fedora} >= 25 find %{buildroot}/%{_libdir}/ -type f -name '*.so' -exec objcopy -R .rustc '{}' ';' %endif @@ -290,6 +296,9 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : %changelog +* Thu Oct 20 2016 Josh Stone - 1.12.1-1 +- Update to 1.12.1. + * Fri Oct 14 2016 Josh Stone - 1.12.0-7 - Rebuild with LLVM 3.9. - Add ncurses-devel for llvm-config's -ltinfo. From 8f339a302b3c05c3c6d4ffefa5b9a5003b682346 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 20 Oct 2016 22:01:39 -0700 Subject: [PATCH 13/14] upload rustc-1.12.1-src.tar.gz --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ce23abb..d3636b3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /rustc-1.11.0-i686-unknown-linux-gnu.tar.gz /rustc-1.11.0-x86_64-unknown-linux-gnu.tar.gz /rustc-1.12.0-src.tar.gz +/rustc-1.12.1-src.tar.gz diff --git a/sources b/sources index a423b9d..7f7a2bb 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ 7386f1fae4b9e9ef95e281ea27f1446a rustc-1.11.0-armv7-unknown-linux-gnueabihf.tar.gz 932c698c242238a68530c2c15fd0b810 rustc-1.11.0-i686-unknown-linux-gnu.tar.gz b83d7a1a90c2d80bef97a518022948c8 rustc-1.11.0-x86_64-unknown-linux-gnu.tar.gz -37ee9fc76712e4e94e14947c160bd6d0 rustc-1.12.0-src.tar.gz +82db5a9cb9a051bf8ece2f5174cb273b rustc-1.12.1-src.tar.gz From 1a280df726ad9886a7046e873f55c0bf8037767b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 21 Oct 2016 23:00:26 -0700 Subject: [PATCH 14/14] Drop the temporary 1.12.1 bootstrap patch --- rust-boot-1.12.1-from-1.12.0.diff | 299 ------------------------------ rust.spec | 6 - 2 files changed, 305 deletions(-) delete mode 100644 rust-boot-1.12.1-from-1.12.0.diff diff --git a/rust-boot-1.12.1-from-1.12.0.diff b/rust-boot-1.12.1-from-1.12.0.diff deleted file mode 100644 index 86b3a26..0000000 --- a/rust-boot-1.12.1-from-1.12.0.diff +++ /dev/null @@ -1,299 +0,0 @@ -diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock -index d52577e..36b94e4 100644 ---- a/src/bootstrap/Cargo.lock -+++ b/src/bootstrap/Cargo.lock -@@ -157,3 +157,24 @@ name = "winapi-build" - version = "0.1.1" - source = "registry+https://github.com/rust-lang/crates.io-index" - -+[metadata] -+"checksum aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2b3fb52b09c1710b961acb35390d514be82e4ac96a9969a8e38565a29b878dc9" -+"checksum cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "dfcf5bcece56ef953b8ea042509e9dcbdfe97820b7e20d86beb53df30ed94978" -+"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922" -+"checksum gcc 0.3.31 (git+https://github.com/alexcrichton/gcc-rs)" = "" -+"checksum gcc 0.3.31 (registry+https://github.com/rust-lang/crates.io-index)" = "cfe877476e53690ebb0ce7325d0bf43e198d9500291b54b3c65e518de5039b07" -+"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" -+"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -+"checksum libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "55f3730be7e803cf350d32061958171731c2395831fbd67a61083782808183e0" -+"checksum md5 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5539a8dee9b4ae308c9c406a379838b435a8f2c84cf9fedc6d5a576be9888db" -+"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -+"checksum num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "51fedae97a05f7353612fe017ab705a37e6db8f4d67c5c6fe739a9e70d6eed09" -+"checksum regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)" = "56b7ee9f764ecf412c6e2fff779bca4b22980517ae335a21aeaf4e32625a5df2" -+"checksum regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "31040aad7470ad9d8c46302dcffba337bb4289ca5da2e3cd6e37b64109a85199" -+"checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b" -+"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -+"checksum thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "55dd963dbaeadc08aa7266bf7f91c3154a7805e32bb94b820b769d2ef3b4744d" -+"checksum toml 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "fcd27a04ca509aff336ba5eb2abc58d456f52c4ff64d9724d88acb85ead560b6" -+"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -+"checksum winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4dfaaa8fbdaa618fa6914b59b2769d690dd7521920a18d84b42d254678dd5fd4" -+"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index 0af6082..b40dbfd 100644 ---- a/src/bootstrap/lib.rs -+++ b/src/bootstrap/lib.rs -@@ -543,6 +543,10 @@ impl Build { - .arg("-j").arg(self.jobs().to_string()) - .arg("--target").arg(target); - -+ // FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005 -+ // Force cargo to output binaries with disambiguating hashes in the name -+ cargo.env("__CARGO_DEFAULT_LIB_METADATA", "1"); -+ - let stage; - if compiler.stage == 0 && self.local_rebuild { - // Assume the local-rebuild rustc already has stage1 features. -diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs -index bb7c971..9bba6cd 100644 ---- a/src/libcore/cmp.rs -+++ b/src/libcore/cmp.rs -@@ -699,38 +699,29 @@ mod impls { - - ord_impl! { char usize u8 u16 u32 u64 isize i8 i16 i32 i64 } - -- // Note: This macro is a temporary hack that can be remove once we are building with a compiler -- // that supports `!` -- macro_rules! not_stage0 { -- () => { -- #[unstable(feature = "never_type", issue = "35121")] -- impl PartialEq for ! { -- fn eq(&self, _: &!) -> bool { -- *self -- } -- } -+ #[unstable(feature = "never_type", issue = "35121")] -+ impl PartialEq for ! { -+ fn eq(&self, _: &!) -> bool { -+ *self -+ } -+ } - -- #[unstable(feature = "never_type", issue = "35121")] -- impl Eq for ! {} -+ #[unstable(feature = "never_type", issue = "35121")] -+ impl Eq for ! {} - -- #[unstable(feature = "never_type", issue = "35121")] -- impl PartialOrd for ! { -- fn partial_cmp(&self, _: &!) -> Option { -- *self -- } -- } -- -- #[unstable(feature = "never_type", issue = "35121")] -- impl Ord for ! { -- fn cmp(&self, _: &!) -> Ordering { -- *self -- } -- } -+ #[unstable(feature = "never_type", issue = "35121")] -+ impl PartialOrd for ! { -+ fn partial_cmp(&self, _: &!) -> Option { -+ *self - } - } - -- #[cfg(not(stage0))] -- not_stage0!(); -+ #[unstable(feature = "never_type", issue = "35121")] -+ impl Ord for ! { -+ fn cmp(&self, _: &!) -> Ordering { -+ *self -+ } -+ } - - // & pointers - -diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs -index dbd715c..7688da9 100644 ---- a/src/libcore/fmt/mod.rs -+++ b/src/libcore/fmt/mod.rs -@@ -1363,28 +1363,19 @@ macro_rules! fmt_refs { - - fmt_refs! { Debug, Display, Octal, Binary, LowerHex, UpperHex, LowerExp, UpperExp } - --// Note: This macro is a temporary hack that can be remove once we are building with a compiler --// that supports `!` --macro_rules! not_stage0 { -- () => { -- #[unstable(feature = "never_type", issue = "35121")] -- impl Debug for ! { -- fn fmt(&self, _: &mut Formatter) -> Result { -- *self -- } -- } -- -- #[unstable(feature = "never_type", issue = "35121")] -- impl Display for ! { -- fn fmt(&self, _: &mut Formatter) -> Result { -- *self -- } -- } -+#[unstable(feature = "never_type", issue = "35121")] -+impl Debug for ! { -+ fn fmt(&self, _: &mut Formatter) -> Result { -+ *self - } - } - --#[cfg(not(stage0))] --not_stage0!(); -+#[unstable(feature = "never_type", issue = "35121")] -+impl Display for ! { -+ fn fmt(&self, _: &mut Formatter) -> Result { -+ *self -+ } -+} - - #[stable(feature = "rust1", since = "1.0.0")] - impl Debug for bool { -diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs -index 7831464..e2ce8ae 100644 ---- a/src/libcore/lib.rs -+++ b/src/libcore/lib.rs -@@ -62,8 +62,6 @@ - #![deny(missing_debug_implementations)] - #![cfg_attr(not(stage0), deny(warnings))] - --#![cfg_attr(stage0, allow(unused_attributes))] -- - #![feature(allow_internal_unstable)] - #![feature(asm)] - #![feature(associated_type_defaults)] -@@ -87,9 +85,7 @@ - #![feature(staged_api)] - #![feature(unboxed_closures)] - #![feature(question_mark)] -- --// NOTE: remove the cfg_attr next snapshot --#![cfg_attr(not(stage0), feature(never_type))] -+#![feature(never_type)] - - #[macro_use] - mod macros; -diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs -index fdae8f6..bd0c2f5 100644 ---- a/src/libpanic_unwind/gcc.rs -+++ b/src/libpanic_unwind/gcc.rs -@@ -264,30 +264,6 @@ unsafe fn find_eh_action(context: *mut uw::_Unwind_Context) -> EHAction { - eh::find_eh_action(lsda, &eh_context) - } - --// *** Delete after a new snapshot *** --#[cfg(all(stage0, any(target_os = "ios", not(target_arch = "arm"))))] --#[lang = "eh_personality_catch"] --#[no_mangle] --pub unsafe extern "C" fn rust_eh_personality_catch(version: c_int, -- actions: uw::_Unwind_Action, -- exception_class: uw::_Unwind_Exception_Class, -- ue_header: *mut uw::_Unwind_Exception, -- context: *mut uw::_Unwind_Context) -- -> uw::_Unwind_Reason_Code { -- rust_eh_personality(version, actions, exception_class, ue_header, context) --} -- --// *** Delete after a new snapshot *** --#[cfg(all(stage0, target_arch = "arm", not(target_os = "ios")))] --#[lang = "eh_personality_catch"] --#[no_mangle] --pub unsafe extern "C" fn rust_eh_personality_catch(state: uw::_Unwind_State, -- ue_header: *mut uw::_Unwind_Exception, -- context: *mut uw::_Unwind_Context) -- -> uw::_Unwind_Reason_Code { -- rust_eh_personality(state, ue_header, context) --} -- - // See docs in the `unwind` module. - #[cfg(all(target_os="windows", target_arch = "x86", target_env="gnu"))] - #[lang = "eh_unwind_resume"] -diff --git a/src/libpanic_unwind/seh64_gnu.rs b/src/libpanic_unwind/seh64_gnu.rs -index 3642e24..e6d3920 100644 ---- a/src/libpanic_unwind/seh64_gnu.rs -+++ b/src/libpanic_unwind/seh64_gnu.rs -@@ -81,21 +81,6 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box { - // This is considered acceptable, because the behavior of throwing exceptions - // through a C ABI boundary is undefined. - --// *** Delete after a new snapshot *** --#[cfg(stage0)] --#[lang = "eh_personality_catch"] --#[cfg(not(test))] --unsafe extern "C" fn rust_eh_personality_catch(exceptionRecord: *mut c::EXCEPTION_RECORD, -- establisherFrame: c::LPVOID, -- contextRecord: *mut c::CONTEXT, -- dispatcherContext: *mut c::DISPATCHER_CONTEXT) -- -> c::EXCEPTION_DISPOSITION { -- rust_eh_personality(exceptionRecord, -- establisherFrame, -- contextRecord, -- dispatcherContext) --} -- - #[lang = "eh_personality"] - #[cfg(not(test))] - unsafe extern "C" fn rust_eh_personality(exceptionRecord: *mut c::EXCEPTION_RECORD, -diff --git a/src/rustc/Cargo.lock b/src/rustc/Cargo.lock -index 0b2287c..8cc22f3 100644 ---- a/src/rustc/Cargo.lock -+++ b/src/rustc/Cargo.lock -@@ -399,3 +399,5 @@ dependencies = [ - "serialize 0.0.0", - ] - -+[metadata] -+"checksum gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)" = "3da3a2cbaeb01363c8e3704fd9fd0eb2ceb17c6f27abd4c1ef040fb57d20dc79" -diff --git a/src/rustc/std_shim/Cargo.lock b/src/rustc/std_shim/Cargo.lock -index 70aef55..d47b541 100644 ---- a/src/rustc/std_shim/Cargo.lock -+++ b/src/rustc/std_shim/Cargo.lock -@@ -118,3 +118,5 @@ dependencies = [ - "libc 0.0.0", - ] - -+[metadata] -+"checksum gcc 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)" = "806e63121fbf30760b060a5fc2d1e9f47e1bd356d183e8870367c6c12cc9d5ed" -diff --git a/src/stage0.txt b/src/stage0.txt -index b07347c..9c2fc4d 100644 ---- a/src/stage0.txt -+++ b/src/stage0.txt -@@ -12,6 +12,6 @@ - # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was - # released on `$date` - --rustc: 1.11.0-2016-08-16 --rustc_key: 39b92f95 --cargo: nightly-2016-07-05 -+rustc: 1.12.0-2016-09-27 -+rustc_key: 40393716 -+cargo: nightly-2016-08-21 -diff --git a/src/tools/compiletest/Cargo.lock b/src/tools/compiletest/Cargo.lock -index 24c8b20..7556978 100644 ---- a/src/tools/compiletest/Cargo.lock -+++ b/src/tools/compiletest/Cargo.lock -@@ -80,3 +80,13 @@ name = "utf8-ranges" - version = "0.1.3" - source = "registry+https://github.com/rust-lang/crates.io-index" - -+[metadata] -+"checksum aho-corasick 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "67077478f0a03952bed2e6786338d400d40c25e9836e08ad50af96607317fd03" -+"checksum env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "aba65b63ffcc17ffacd6cf5aa843da7c5a25e3bd4bbe0b7def8b214e411250e5" -+"checksum libc 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "95ca44454e7cfe7f8a2095a41a10c79d96a177c0b1672cbf1a30d901a9c16ee5" -+"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054" -+"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -+"checksum mempool 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f997e65fe3eb7a6f8557a7a477de9ed5c511850c85363d13f7b0145b526ed36a" -+"checksum regex 0.1.62 (registry+https://github.com/rust-lang/crates.io-index)" = "22bdab319e36735729aa280752c9293b29ec0053a6810679d697515f80a986fe" -+"checksum regex-syntax 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "841591b1e05609a643e3b4d0045fce04f701daba7151ddcd3ad47b080693d5a9" -+"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -diff --git a/src/tools/linkchecker/Cargo.lock b/src/tools/linkchecker/Cargo.lock -index ed5fe08..d71df6d 100644 ---- a/src/tools/linkchecker/Cargo.lock -+++ b/src/tools/linkchecker/Cargo.lock -@@ -42,3 +42,9 @@ dependencies = [ - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - ] - -+[metadata] -+"checksum idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1053236e00ce4f668aeca4a769a09b3bf5a682d802abd6f3cb39374f6b162c11" -+"checksum matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "15305656809ce5a4805b1ff2946892810992197ce1270ff79baded852187942e" -+"checksum unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c1f7ceb96afdfeedee42bade65a0d585a6a0106f681b6749c8ff4daa8df30b3f" -+"checksum unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "26643a2f83bac55f1976fb716c10234485f9202dcd65cfbdf9da49867b271172" -+"checksum url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afe9ec54bc4db14bc8744b7fed060d785ac756791450959b2248443319d5b119" diff --git a/rust.spec b/rust.spec index e8d4213..c0f15e7 100644 --- a/rust.spec +++ b/rust.spec @@ -61,11 +61,6 @@ Patch1: rust-pr35814-armv7-no-neon.patch # merged for 1.14.0 Patch2: rust-pr36933-less-neon-again.patch -# temporary measure for building 1.12.1 from 1.12.0 -# https://users.rust-lang.org/t/bootstrapping-1-12-1-from-1-12-0/7715 -# https://gist.github.com/brson/ff61fef70ac30ed4a33672e2b230e7e1 -Patch3: rust-boot-1.12.1-from-1.12.0.diff - BuildRequires: make BuildRequires: cmake BuildRequires: gcc @@ -157,7 +152,6 @@ test -f '%{local_rust_root}/bin/rustc' %patch1 -p1 -b .no-neon %patch2 -p1 -b .less-neon -%patch3 -p1 -b .bootstrap # unbundle rm -rf src/jemalloc/