Update to 1.34.1.
Add a ThinLTO fix for rhbz1701339.
This commit is contained in:
parent
58b5337e4c
commit
e72f8fbbbb
1
.gitignore
vendored
1
.gitignore
vendored
@ -194,3 +194,4 @@
|
|||||||
/rust-1.33.0-powerpc64-unknown-linux-gnu.tar.xz
|
/rust-1.33.0-powerpc64-unknown-linux-gnu.tar.xz
|
||||||
/rust-1.33.0-s390x-unknown-linux-gnu.tar.xz
|
/rust-1.33.0-s390x-unknown-linux-gnu.tar.xz
|
||||||
/rust-1.33.0-x86_64-unknown-linux-gnu.tar.xz
|
/rust-1.33.0-x86_64-unknown-linux-gnu.tar.xz
|
||||||
|
/rustc-1.34.1-src.tar.xz
|
||||||
|
29
0001-Limit-internalization-in-LLVM-8-ThinLTO.patch
Normal file
29
0001-Limit-internalization-in-LLVM-8-ThinLTO.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From b4131e297e18fde119f6f461b3e622218166b009 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josh Stone <jistone@redhat.com>
|
||||||
|
Date: Fri, 26 Apr 2019 08:58:14 -0700
|
||||||
|
Subject: [PATCH] Limit internalization in LLVM 8 ThinLTO
|
||||||
|
|
||||||
|
---
|
||||||
|
src/rustllvm/PassWrapper.cpp | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
|
||||||
|
index 319c66a21f17..0ebef82d3768 100644
|
||||||
|
--- a/src/rustllvm/PassWrapper.cpp
|
||||||
|
+++ b/src/rustllvm/PassWrapper.cpp
|
||||||
|
@@ -873,8 +873,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
|
||||||
|
return PrevailingType::Unknown;
|
||||||
|
};
|
||||||
|
#if LLVM_VERSION_GE(8, 0)
|
||||||
|
+ // We don't have a complete picture in our use of ThinLTO, just our immediate
|
||||||
|
+ // crate, so we need `ImportEnabled = false` to limit internalization.
|
||||||
|
+ // Otherwise, we sometimes lose `static` values -- see #60184.
|
||||||
|
computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols,
|
||||||
|
- deadIsPrevailing, /* ImportEnabled = */ true);
|
||||||
|
+ deadIsPrevailing, /* ImportEnabled = */ false);
|
||||||
|
#else
|
||||||
|
computeDeadSymbols(Ret->Index, Ret->GUIDPreservedSymbols, deadIsPrevailing);
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
19
rust.spec
19
rust.spec
@ -53,7 +53,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.34.0
|
Version: 1.34.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Rust Programming Language
|
Summary: The Rust Programming Language
|
||||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||||
@ -72,6 +72,9 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
|||||||
# We do have the necessary fix in our LLVM 7.
|
# We do have the necessary fix in our LLVM 7.
|
||||||
Patch1: rust-pr57840-llvm7-debuginfo-variants.patch
|
Patch1: rust-pr57840-llvm7-debuginfo-variants.patch
|
||||||
|
|
||||||
|
# https://github.com/rust-lang/rust/pull/60313
|
||||||
|
Patch2: 0001-Limit-internalization-in-LLVM-8-ThinLTO.patch
|
||||||
|
|
||||||
# Get the Rust triple for any arch.
|
# Get the Rust triple for any arch.
|
||||||
%{lua: function rust_triple(arch)
|
%{lua: function rust_triple(arch)
|
||||||
local abi = "gnu"
|
local abi = "gnu"
|
||||||
@ -215,6 +218,15 @@ Requires: /usr/bin/cc
|
|||||||
# Use hardening ldflags.
|
# Use hardening ldflags.
|
||||||
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
|
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
|
||||||
|
|
||||||
|
%ifarch %{ix86}
|
||||||
|
# i686 fails to link some static symbols with ThinLTO:
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1701339
|
||||||
|
# https://github.com/rust-lang/rust/issues/60184
|
||||||
|
# and since this affects rustbook built with *stage0*, we can't just patch it.
|
||||||
|
# Workaround: using a single codegen unit bypasses ThinLTO.
|
||||||
|
%global rustflags %{rustflags} -Ccodegen-units=1
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{without bundled_llvm}
|
%if %{without bundled_llvm}
|
||||||
%if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1}
|
%if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1}
|
||||||
%global llvm_has_filecheck 1
|
%global llvm_has_filecheck 1
|
||||||
@ -396,6 +408,7 @@ test -f '%{local_rust_root}/bin/rustc'
|
|||||||
%setup -q -n %{rustc_package}
|
%setup -q -n %{rustc_package}
|
||||||
|
|
||||||
%patch1 -p1 -R
|
%patch1 -p1 -R
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%if "%{python}" == "python3"
|
%if "%{python}" == "python3"
|
||||||
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
|
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
|
||||||
@ -671,6 +684,10 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 25 2019 Josh Stone <jistone@redhat.com> - 1.34.1-1
|
||||||
|
- Update to 1.34.1.
|
||||||
|
- Add a ThinLTO fix for rhbz1701339.
|
||||||
|
|
||||||
* Thu Apr 11 2019 Josh Stone <jistone@redhat.com> - 1.34.0-1
|
* Thu Apr 11 2019 Josh Stone <jistone@redhat.com> - 1.34.0-1
|
||||||
- Update to 1.34.0.
|
- Update to 1.34.0.
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (rustc-1.34.0-src.tar.xz) = cf9952cafe42987f84a6fe9e351a401f2db35c33ddc87d2efb762c4c33a643ffe516f00d848a1ae759f48cea1504243b6169c29ab28ba2e6b00a51422c745861
|
SHA512 (rustc-1.34.1-src.tar.xz) = c9ee59a98e0300c16a9044424fbaad0e1d5f026279b9cb238ab5bfe02c6b111780ec5f9884c4cac67d5ee91833e301bc23bd457026982587982b2fb80a528dca
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SHA512 (rustc-1.34.0-src.tar.xz) = cf9952cafe42987f84a6fe9e351a401f2db35c33ddc87d2efb762c4c33a643ffe516f00d848a1ae759f48cea1504243b6169c29ab28ba2e6b00a51422c745861
|
SHA512 (rustc-1.34.1-src.tar.xz) = c9ee59a98e0300c16a9044424fbaad0e1d5f026279b9cb238ab5bfe02c6b111780ec5f9884c4cac67d5ee91833e301bc23bd457026982587982b2fb80a528dca
|
||||||
SHA512 (rust-1.33.0-aarch64-unknown-linux-gnu.tar.xz) = 51f6ca909411fd3b3c05baedc38be8a29923966e7cd6960a10152886687132d4ef9750140c5121b9486d6f6ee1ed7ff35f8105c9f0731fe98ce750d0ea9c528f
|
SHA512 (rust-1.33.0-aarch64-unknown-linux-gnu.tar.xz) = 51f6ca909411fd3b3c05baedc38be8a29923966e7cd6960a10152886687132d4ef9750140c5121b9486d6f6ee1ed7ff35f8105c9f0731fe98ce750d0ea9c528f
|
||||||
SHA512 (rust-1.33.0-armv7-unknown-linux-gnueabihf.tar.xz) = 25a16c576d826115fdac5a55b89bf3372dfb39c563f2ce7d39b0a7a3c9bdc43eaf10974dfa42e26c5aa04aee169ced3e797fa46fa82bd9f4ceddeddaf6687659
|
SHA512 (rust-1.33.0-armv7-unknown-linux-gnueabihf.tar.xz) = 25a16c576d826115fdac5a55b89bf3372dfb39c563f2ce7d39b0a7a3c9bdc43eaf10974dfa42e26c5aa04aee169ced3e797fa46fa82bd9f4ceddeddaf6687659
|
||||||
SHA512 (rust-1.33.0-i686-unknown-linux-gnu.tar.xz) = f61f97c529232fd6d7587bbf34c41dd9cc334272b1d523464d7b964aba5a102edaff8d387445e3fdb2b9587c1cdd870e97b9572c9421e79ee047479443f1896d
|
SHA512 (rust-1.33.0-i686-unknown-linux-gnu.tar.xz) = f61f97c529232fd6d7587bbf34c41dd9cc334272b1d523464d7b964aba5a102edaff8d387445e3fdb2b9587c1cdd870e97b9572c9421e79ee047479443f1896d
|
||||||
|
Loading…
Reference in New Issue
Block a user