Update to 1.57.0, fixes rhbz#2028675.
Backport rust#91070, fixes rhbz#1990657 Add rust-std-static-wasm32-wasi
This commit is contained in:
parent
7b8811c5df
commit
b4ce4e3b09
8
.gitignore
vendored
8
.gitignore
vendored
@ -375,3 +375,11 @@
|
||||
/rust-1.55.0-s390x-unknown-linux-gnu.tar.xz
|
||||
/rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz
|
||||
/rustc-1.56.1-src.tar.xz
|
||||
/rustc-1.57.0-src.tar.xz
|
||||
/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz
|
||||
/rust-1.56.1-aarch64-unknown-linux-gnu.tar.xz
|
||||
/rust-1.56.1-armv7-unknown-linux-gnueabihf.tar.xz
|
||||
/rust-1.56.1-i686-unknown-linux-gnu.tar.xz
|
||||
/rust-1.56.1-powerpc64le-unknown-linux-gnu.tar.xz
|
||||
/rust-1.56.1-s390x-unknown-linux-gnu.tar.xz
|
||||
/rust-1.56.1-x86_64-unknown-linux-gnu.tar.xz
|
||||
|
@ -1,102 +0,0 @@
|
||||
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
|
||||
|
94
rust-pr91070.patch
Normal file
94
rust-pr91070.patch
Normal file
@ -0,0 +1,94 @@
|
||||
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||
index e77d29bed712..f3d8eb2602a3 100644
|
||||
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
|
||||
@@ -124,8 +124,18 @@ extern "C" LLVMValueRef LLVMRustGetOrInsertFunction(LLVMModuleRef M,
|
||||
|
||||
extern "C" LLVMValueRef
|
||||
LLVMRustGetOrInsertGlobal(LLVMModuleRef M, const char *Name, size_t NameLen, LLVMTypeRef Ty) {
|
||||
+ Module *Mod = unwrap(M);
|
||||
StringRef NameRef(Name, NameLen);
|
||||
- return wrap(unwrap(M)->getOrInsertGlobal(NameRef, unwrap(Ty)));
|
||||
+
|
||||
+ // We don't use Module::getOrInsertGlobal because that returns a Constant*,
|
||||
+ // which may either be the real GlobalVariable*, or a constant bitcast of it
|
||||
+ // if our type doesn't match the original declaration. We always want the
|
||||
+ // GlobalVariable* so we can access linkage, visibility, etc.
|
||||
+ GlobalVariable *GV = Mod->getGlobalVariable(NameRef, true);
|
||||
+ if (!GV)
|
||||
+ GV = new GlobalVariable(*Mod, unwrap(Ty), false,
|
||||
+ GlobalValue::ExternalLinkage, nullptr, NameRef);
|
||||
+ return wrap(GV);
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef
|
||||
diff --git a/src/test/ui/statics/issue-91050-1.rs b/src/test/ui/statics/issue-91050-1.rs
|
||||
new file mode 100644
|
||||
index 000000000000..403a41462ef1
|
||||
--- /dev/null
|
||||
+++ b/src/test/ui/statics/issue-91050-1.rs
|
||||
@@ -0,0 +1,34 @@
|
||||
+// build-pass
|
||||
+// compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes
|
||||
+
|
||||
+// This test declares globals by the same name with different types, which
|
||||
+// caused problems because Module::getOrInsertGlobal would return a Constant*
|
||||
+// bitcast instead of a GlobalVariable* that could access linkage/visibility.
|
||||
+// In alt builds with LLVM assertions this would fail:
|
||||
+//
|
||||
+// rustc: /checkout/src/llvm-project/llvm/include/llvm/Support/Casting.h:269:
|
||||
+// typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = llvm::GlobalValue, Y = llvm::Value]:
|
||||
+// Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
|
||||
+//
|
||||
+// In regular builds, the bad cast was UB, like "Invalid LLVMRustVisibility value!"
|
||||
+
|
||||
+pub mod before {
|
||||
+ #[no_mangle]
|
||||
+ pub static GLOBAL1: [u8; 1] = [1];
|
||||
+}
|
||||
+
|
||||
+pub mod inner {
|
||||
+ extern "C" {
|
||||
+ pub static GLOBAL1: u8;
|
||||
+ pub static GLOBAL2: u8;
|
||||
+ }
|
||||
+
|
||||
+ pub fn call() {
|
||||
+ drop(unsafe { (GLOBAL1, GLOBAL2) });
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+pub mod after {
|
||||
+ #[no_mangle]
|
||||
+ pub static GLOBAL2: [u8; 1] = [2];
|
||||
+}
|
||||
diff --git a/src/test/ui/statics/issue-91050-2.rs b/src/test/ui/statics/issue-91050-2.rs
|
||||
new file mode 100644
|
||||
index 000000000000..2ff954d15cab
|
||||
--- /dev/null
|
||||
+++ b/src/test/ui/statics/issue-91050-2.rs
|
||||
@@ -0,0 +1,24 @@
|
||||
+// build-pass
|
||||
+// compile-flags: --crate-type=rlib --emit=llvm-ir -Cno-prepopulate-passes
|
||||
+
|
||||
+// This is a variant of issue-91050-1.rs -- see there for an explanation.
|
||||
+
|
||||
+pub mod before {
|
||||
+ extern "C" {
|
||||
+ pub static GLOBAL1: [u8; 1];
|
||||
+ }
|
||||
+
|
||||
+ pub unsafe fn do_something_with_array() -> u8 {
|
||||
+ GLOBAL1[0]
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+pub mod inner {
|
||||
+ extern "C" {
|
||||
+ pub static GLOBAL1: u8;
|
||||
+ }
|
||||
+
|
||||
+ pub unsafe fn call() -> u8 {
|
||||
+ GLOBAL1 + 42
|
||||
+ }
|
||||
+}
|
122
rust.spec
122
rust.spec
@ -1,6 +1,6 @@
|
||||
# Only x86_64 and i686 are Tier 1 platforms at this time.
|
||||
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
|
||||
%global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x
|
||||
%global rust_arches x86_64 i686 armv7hl aarch64 ppc64le s390x
|
||||
|
||||
# The channel can be stable, beta, or nightly
|
||||
%{!?channel: %global channel stable}
|
||||
@ -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.55.0
|
||||
%global bootstrap_cargo 1.55.0
|
||||
%global bootstrap_channel 1.55.0
|
||||
%global bootstrap_date 2021-09-09
|
||||
%global bootstrap_rust 1.56.1
|
||||
%global bootstrap_cargo 1.56.1
|
||||
%global bootstrap_channel 1.56.1
|
||||
%global bootstrap_date 2021-11-01
|
||||
|
||||
# Only the specified arches will use bootstrap binaries.
|
||||
#global bootstrap_arches %%{rust_arches}
|
||||
@ -22,10 +22,19 @@
|
||||
# reproducible between hosts, so only x86_64 actually builds it.
|
||||
%ifarch x86_64
|
||||
%if 0%{?fedora}
|
||||
%global cross_targets wasm32-unknown-unknown
|
||||
%global cross_targets wasm32-unknown-unknown wasm32-wasi
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# We need CRT files for *-wasi targets, at least as new as the commit in
|
||||
# src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh
|
||||
%global forgeurl1 https://github.com/WebAssembly/wasi-libc
|
||||
%global commit1 ad5133410f66b93a2381db5b542aad5e0964db96
|
||||
%forgemeta -z 1
|
||||
%undefine distprefix1
|
||||
%global wasi_libc_source %{forgesource1}
|
||||
%global wasi_libc_dir %{_builddir}/%{extractdir1}
|
||||
|
||||
# Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.
|
||||
%bcond_with llvm_static
|
||||
|
||||
@ -33,8 +42,8 @@
|
||||
# is insufficient. Rust currently requires LLVM 10.0+.
|
||||
%bcond_with bundled_llvm
|
||||
|
||||
# Requires stable libgit2 1.1
|
||||
%if 0%{?fedora} >= 34
|
||||
# Requires stable libgit2 1.3
|
||||
%if 0%{?fedora} >= 36
|
||||
%bcond_with bundled_libgit2
|
||||
%else
|
||||
%bcond_without bundled_libgit2
|
||||
@ -61,8 +70,8 @@
|
||||
%endif
|
||||
|
||||
Name: rust
|
||||
Version: 1.56.1
|
||||
Release: 3%{?dist}
|
||||
Version: 1.57.0
|
||||
Release: 1%{?dist}
|
||||
Summary: The Rust Programming Language
|
||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||
# ^ written as: (rust itself) and (bundled libraries)
|
||||
@ -75,11 +84,12 @@ ExclusiveArch: %{rust_arches}
|
||||
%global rustc_package rustc-%{channel}-src
|
||||
%endif
|
||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||
Source1: %{wasi_libc_source}
|
||||
# Sources for bootstrap_arches are inserted by lua below
|
||||
|
||||
# An internal rust-abi change broke s390x, but it's fixed in LLVM 12.0.1.
|
||||
# We'll revert the change on Fedora 33 that has an unpatched LLVM 11.
|
||||
# https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032
|
||||
Patch1: 0001-Revert-Auto-merge-of-79547.patch
|
||||
# Fix a bad typecast for LLVM globals, rhbz#1990657
|
||||
# https://github.com/rust-lang/rust/pull/91070
|
||||
Patch1: rust-pr91070.patch
|
||||
|
||||
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
|
||||
Patch2: 0001-Use-lld-provided-by-system-for-wasm.patch
|
||||
@ -91,11 +101,11 @@ Patch100: rustc-1.56.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.56.0-disable-http2.patch
|
||||
Patch101: rustc-1.57.0-disable-http2.patch
|
||||
|
||||
# kernel rh1410097 causes too-small stacks for PIE.
|
||||
# (affects RHEL6 kernels when building for RHEL7)
|
||||
Patch102: rustc-1.51.0-no-default-pie.patch
|
||||
Patch102: rustc-1.57.0-no-default-pie.patch
|
||||
|
||||
|
||||
# Get the Rust triple for any arch.
|
||||
@ -128,6 +138,7 @@ end}
|
||||
.."/rust-%{bootstrap_channel}")
|
||||
local target_arch = rpm.expand("%{_target_cpu}")
|
||||
for i, arch in ipairs(bootstrap_arches) do
|
||||
i = 100 + i
|
||||
print(string.format("Source%d: %s-%s.tar.xz\n",
|
||||
i, base, rust_triple(arch)))
|
||||
if arch == target_arch then
|
||||
@ -165,7 +176,7 @@ BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
|
||||
%if %{without bundled_libgit2}
|
||||
BuildRequires: pkgconfig(libgit2) >= 1.1.0
|
||||
BuildRequires: pkgconfig(libgit2) >= 1.3.0
|
||||
%endif
|
||||
|
||||
%if %{without disabled_libssh2}
|
||||
@ -185,10 +196,6 @@ BuildRequires: cmake >= 2.8.11
|
||||
%if 0%{?epel} == 7
|
||||
%global llvm llvm11
|
||||
%endif
|
||||
%if 0%{?fedora} == 35
|
||||
# f35 still only has 13.0.0~rc1
|
||||
%global llvm llvm12
|
||||
%endif
|
||||
%if %defined llvm
|
||||
%global llvm_root %{_libdir}/%{llvm}
|
||||
%else
|
||||
@ -262,6 +269,7 @@ BuildRequires: %{devtoolset_name}-gcc-c++
|
||||
%global rustlibdir %{common_libdir}/rustlib
|
||||
|
||||
%if %defined cross_targets
|
||||
BuildRequires: clang
|
||||
# brp-strip-static-archive breaks the archive index for wasm
|
||||
%global __os_install_post \
|
||||
%__os_install_post \
|
||||
@ -286,23 +294,29 @@ written in Rust.
|
||||
%if %defined cross_targets
|
||||
%{lua: do
|
||||
for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do
|
||||
local requires = rpm.expand("Requires: rust = %{version}-%{release}")
|
||||
if string.sub(triple, 1, 4) == "wasm" then
|
||||
requires = requires .. "\nRequires: lld >= 8.0"
|
||||
end
|
||||
local subs = {
|
||||
triple = triple,
|
||||
requires = requires,
|
||||
verrel = rpm.expand("%{version}-%{release}"),
|
||||
wasm = string.sub(triple, 1, 4) == "wasm" and 1 or 0,
|
||||
wasi = string.find(triple, "-wasi") and 1 or 0,
|
||||
}
|
||||
local s = string.gsub([[
|
||||
|
||||
%package std-static-{{triple}}
|
||||
Summary: Standard library for Rust
|
||||
BuildArch: noarch
|
||||
{{requires}}
|
||||
Requires: rust = {{verrel}}
|
||||
%if {{wasm}}
|
||||
Requires: lld >= 8.0
|
||||
%endif
|
||||
%if {{wasi}}
|
||||
Provides: bundled(wasi-libc)
|
||||
%endif
|
||||
|
||||
%description std-static-{{triple}}
|
||||
This package includes the standard libraries for building applications
|
||||
written in Rust for the {{triple}} target.
|
||||
|
||||
]], "{{(%w+)}}", subs)
|
||||
print(s)
|
||||
end
|
||||
@ -360,7 +374,7 @@ its standard library.
|
||||
%package -n cargo
|
||||
Summary: Rust's package manager and build tool
|
||||
%if %with bundled_libgit2
|
||||
Provides: bundled(libgit2) = 1.1.0
|
||||
Provides: bundled(libgit2) = 1.3.0
|
||||
%endif
|
||||
# For tests:
|
||||
BuildRequires: git
|
||||
@ -403,7 +417,7 @@ A tool for formatting Rust code according to style guidelines.
|
||||
%package -n rls
|
||||
Summary: Rust Language Server for IDE integration
|
||||
%if %with bundled_libgit2
|
||||
Provides: bundled(libgit2) = 1.1.0
|
||||
Provides: bundled(libgit2) = 1.3.0
|
||||
%endif
|
||||
Requires: rust-analysis
|
||||
# /usr/bin/rls is dynamically linked against internal rustc libs
|
||||
@ -463,13 +477,13 @@ test -f '%{local_rust_root}/bin/cargo'
|
||||
test -f '%{local_rust_root}/bin/rustc'
|
||||
%endif
|
||||
|
||||
%setup -q -n %{rustc_package}
|
||||
|
||||
%if 0%{?fedora} == 33
|
||||
# revert only for LLVM 11
|
||||
%patch1 -p1
|
||||
%if %defined cross_targets
|
||||
%forgesetup -z 1
|
||||
%endif
|
||||
|
||||
%setup -q -n %{rustc_package}
|
||||
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%if %with disabled_libssh2
|
||||
@ -543,10 +557,6 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
|
||||
%if 0%{?cmake_path:1}
|
||||
%global rust_env %{rust_env} PATH="%{cmake_path}:$PATH"
|
||||
%endif
|
||||
%if %without bundled_libgit2
|
||||
# convince libgit2-sys to use the distro libgit2
|
||||
%global rust_env %{rust_env} LIBGIT2_SYS_USE_PKG_CONFIG=1
|
||||
%endif
|
||||
%if %without disabled_libssh2
|
||||
# convince libssh2-sys to use the distro libssh2
|
||||
%global rust_env %{rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
@ -578,6 +588,22 @@ if [ "$max_cpus" -ge 1 -a "$max_cpus" -lt "$ncpus" ]; then
|
||||
ncpus="$max_cpus"
|
||||
fi
|
||||
|
||||
%if %defined cross_targets
|
||||
%make_build -C %{wasi_libc_dir}
|
||||
%{lua: do
|
||||
local wasi_root = rpm.expand("%{wasi_libc_dir}") .. "/sysroot"
|
||||
local set_wasi_root = ""
|
||||
for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do
|
||||
if string.find(triple, "-wasi") then
|
||||
set_wasi_root = set_wasi_root .. " --set target." .. triple .. ".wasi-root=" .. wasi_root
|
||||
end
|
||||
end
|
||||
if wasi_root ~= "" then
|
||||
rpm.define("set_wasi_root "..set_wasi_root)
|
||||
end
|
||||
end}
|
||||
%endif
|
||||
|
||||
%configure --disable-option-checking \
|
||||
--libdir=%{common_libdir} \
|
||||
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
|
||||
@ -596,7 +622,7 @@ fi
|
||||
--tools=analysis,cargo,clippy,rls,rustfmt,src \
|
||||
--enable-vendor \
|
||||
--enable-verbose-tests \
|
||||
%{?codegen_units_std} \
|
||||
%{?set_wasi_root} \
|
||||
--dist-compression-formats=gz \
|
||||
--release-channel=%{channel} \
|
||||
--release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}"
|
||||
@ -694,6 +720,12 @@ rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
|
||||
%check
|
||||
export %{rust_env}
|
||||
|
||||
# Sanity-check the installed binaries, debuginfo-stripped and all.
|
||||
%{buildroot}%{_bindir}/cargo new build/hello-world
|
||||
env RUSTC=%{buildroot}%{_bindir}/rustc \
|
||||
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
|
||||
%{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml
|
||||
|
||||
# The results are not stable on koji, so mask errors and just log it.
|
||||
# Some of the larger test artifacts are manually cleaned to save space.
|
||||
%{python} ./x.py test --no-fail-fast --stage 2 || :
|
||||
@ -740,13 +772,20 @@ env RLS_TEST_WAIT_FOR_AGES=1 \
|
||||
local subs = {
|
||||
triple = triple,
|
||||
rustlibdir = rpm.expand("%{rustlibdir}"),
|
||||
wasi = string.find(triple, "-wasi") and 1 or 0,
|
||||
}
|
||||
local s = string.gsub([[
|
||||
|
||||
%files std-static-{{triple}}
|
||||
%dir {{rustlibdir}}
|
||||
%dir {{rustlibdir}}/{{triple}}
|
||||
%dir {{rustlibdir}}/{{triple}}/lib
|
||||
{{rustlibdir}}/{{triple}}/lib/*.rlib
|
||||
%if {{wasi}}
|
||||
%dir {{rustlibdir}}/{{triple}}/lib/self-contained
|
||||
{{rustlibdir}}/{{triple}}/lib/self-contained/crt*.o
|
||||
%endif
|
||||
|
||||
]], "{{(%w+)}}", subs)
|
||||
print(s)
|
||||
end
|
||||
@ -837,6 +876,11 @@ end}
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 02 2021 Josh Stone <jistone@redhat.com> - 1.57.0-1
|
||||
- Update to 1.57.0, fixes rhbz#2028675.
|
||||
- Backport rust#91070, fixes rhbz#1990657
|
||||
- Add rust-std-static-wasm32-wasi
|
||||
|
||||
* Sun Nov 28 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.56.1-3
|
||||
- De-bootstrap (libgit2)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- rustc-1.56.0-src/Cargo.lock.orig 2021-10-19 18:03:53.928187581 -0700
|
||||
+++ rustc-1.56.0-src/Cargo.lock 2021-10-19 18:05:41.443522980 -0700
|
||||
@@ -877,7 +877,6 @@
|
||||
--- rustc-beta-src/Cargo.lock.orig 2021-11-29 10:37:40.665228216 -0800
|
||||
+++ rustc-beta-src/Cargo.lock 2021-11-29 10:37:40.667228175 -0800
|
||||
@@ -889,7 +889,6 @@
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@ -25,19 +25,19 @@
|
||||
name = "libz-sys"
|
||||
version = "1.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
--- rustc-1.56.0-src/src/tools/cargo/Cargo.toml.orig 2021-10-19 18:03:53.930187532 -0700
|
||||
+++ rustc-1.56.0-src/src/tools/cargo/Cargo.toml 2021-10-19 18:05:13.663211469 -0700
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2021-11-29 10:37:40.667228175 -0800
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2021-11-29 10:38:41.291987733 -0800
|
||||
@@ -25,7 +25,7 @@
|
||||
cargo-util = { path = "crates/cargo-util", version = "0.1.1" }
|
||||
crates-io = { path = "crates/crates-io", version = "0.33.0" }
|
||||
crossbeam-utils = "0.8"
|
||||
-curl = { version = "0.4.38", features = ["http2"] }
|
||||
+curl = { version = "0.4.38", features = [] }
|
||||
curl-sys = "0.4.48"
|
||||
-curl = { version = "0.4.39", features = ["http2"] }
|
||||
+curl = { version = "0.4.39", features = [] }
|
||||
curl-sys = "0.4.49"
|
||||
env_logger = "0.9.0"
|
||||
pretty_env_logger = { version = "0.4", optional = true }
|
||||
--- rustc-1.56.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2021-10-18 02:52:56.000000000 -0700
|
||||
+++ rustc-1.56.0-src/src/tools/cargo/src/cargo/core/package.rs 2021-10-19 18:03:53.931187507 -0700
|
||||
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2021-11-27 09:38:17.000000000 -0800
|
||||
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2021-11-29 10:37:40.667228175 -0800
|
||||
@@ -417,14 +417,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
|
@ -1,18 +1,23 @@
|
||||
--- rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2021-03-09 10:40:09.755485845 -0800
|
||||
+++ rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs 2021-03-09 10:44:51.257426181 -0800
|
||||
@@ -1279,11 +1279,13 @@
|
||||
--- rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2021-11-29 10:41:02.380100917 -0800
|
||||
+++ rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs 2021-11-29 10:53:31.014783112 -0800
|
||||
@@ -1485,15 +1485,14 @@
|
||||
}
|
||||
|
||||
fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind {
|
||||
- let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) {
|
||||
+ // Only use PIE if explicity specified.
|
||||
+ let explicit_pic = matches!(sess.opts.cg.relocation_model, Some(RelocModel::Pic));
|
||||
+ let explicit_pic =
|
||||
+ matches!(sess.opts.cg.relocation_model, Some(RelocModel::Pic | RelocModel::Pie));
|
||||
+ let kind = match (crate_type, sess.crt_static(Some(crate_type)), explicit_pic) {
|
||||
(CrateType::Executable, _, _) if sess.is_wasi_reactor() => LinkOutputKind::WasiReactorExe,
|
||||
- (CrateType::Executable, false, RelocModel::Pic) => LinkOutputKind::DynamicPicExe,
|
||||
- (CrateType::Executable, false, RelocModel::Pic | RelocModel::Pie) => {
|
||||
- LinkOutputKind::DynamicPicExe
|
||||
- }
|
||||
+ (CrateType::Executable, false, true) => LinkOutputKind::DynamicPicExe,
|
||||
(CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe,
|
||||
- (CrateType::Executable, true, RelocModel::Pic) => LinkOutputKind::StaticPicExe,
|
||||
- (CrateType::Executable, true, RelocModel::Pic | RelocModel::Pie) => {
|
||||
- LinkOutputKind::StaticPicExe
|
||||
- }
|
||||
+ (CrateType::Executable, true, true) => LinkOutputKind::StaticPicExe,
|
||||
(CrateType::Executable, true, _) => LinkOutputKind::StaticNoPicExe,
|
||||
(_, true, _) => LinkOutputKind::StaticDylib,
|
3
sources
3
sources
@ -1 +1,2 @@
|
||||
SHA512 (rustc-1.56.1-src.tar.xz) = 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f
|
||||
SHA512 (rustc-1.57.0-src.tar.xz) = 7903bcfc7c1db208da5d5991bd5b7f55dbe5917d4814274a8badf0d3b767211e81f8626c355ea93142f236abf116d5921c0b542ef309fbe84ece1ce84e5af30f
|
||||
SHA512 (wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz) = 04cb3a25fef7949bf77f262bd939102f5b36e2ae85f28cdbfcd8a8984425fba54fae68049b777974bdbad96882fab383b44203e8f19a776d8a56a55475c4aab6
|
||||
|
@ -1,8 +1,8 @@
|
||||
SHA512 (rustc-1.56.1-src.tar.xz) = 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f
|
||||
SHA512 (rust-1.55.0-aarch64-unknown-linux-gnu.tar.xz) = 223a024701762675adb5c7c59fc54717d23f2ae4ea5984cd1cc0568d39c5207aa07a104ddad68da057f6434eecf23415ae13be2235797897d8d0f7cb5f2fc4b5
|
||||
SHA512 (rust-1.55.0-armv7-unknown-linux-gnueabihf.tar.xz) = b06b3c36b5ca35391030f3c9d2f64725263ac987002923d9263c4c27877d91453db3191e01d40c78f439a48f83da220926a2841337d815dd333591d453f2fc0e
|
||||
SHA512 (rust-1.55.0-i686-unknown-linux-gnu.tar.xz) = a0222c68c63ddd67afee552dd9ed636ea02fd3f26000deb7a1dc47806a1ec0b2fafaed903d4dabb0fddeb9e4026bf0da8bb2161c14db24d2883c084932e306b6
|
||||
SHA512 (rust-1.55.0-powerpc64-unknown-linux-gnu.tar.xz) = 367ddaee0131ae05945b0a81efb73fde479140cb8078d10ec166c0da68afc1fa2aff40a8e6246c2b4861a876b8672a8d8d126bf15d23830c6e170aa27c1d6a7b
|
||||
SHA512 (rust-1.55.0-powerpc64le-unknown-linux-gnu.tar.xz) = 67c98c7cc44482082daa5daa3926dc92782b373b3173181413e68d59ea07f6eee61d46f3832a3fce18bdc44dd563e2e1f85709435e04c599b299981ecd932a9f
|
||||
SHA512 (rust-1.55.0-s390x-unknown-linux-gnu.tar.xz) = 7fc83c8723493864a470f32a05db9e16ecba0ff621080d8a3a257e6f42a37bfcc8d364d71aff696991dd85635f6596ffa72efdefee1620c308984536b48d212a
|
||||
SHA512 (rust-1.55.0-x86_64-unknown-linux-gnu.tar.xz) = 4bc304727b1e9459194a9a9ad5c8e1fe63501f01047d479585de6708365b3f59e09aade64c7f4969df204f8bbcf9de9508745d2b96bc25cb74ed093f8053a4d6
|
||||
SHA512 (rustc-1.57.0-src.tar.xz) = 7903bcfc7c1db208da5d5991bd5b7f55dbe5917d4814274a8badf0d3b767211e81f8626c355ea93142f236abf116d5921c0b542ef309fbe84ece1ce84e5af30f
|
||||
SHA512 (wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz) = 04cb3a25fef7949bf77f262bd939102f5b36e2ae85f28cdbfcd8a8984425fba54fae68049b777974bdbad96882fab383b44203e8f19a776d8a56a55475c4aab6
|
||||
SHA512 (rust-1.56.1-aarch64-unknown-linux-gnu.tar.xz) = 1e612617206f0cb49ddc24352b8c8d344ac4613a71c59532e8df78189fd2ff13d71e4b1fa433e06e4af9b50292558b00f2118ffb8efff31359c28ac2fd5f5044
|
||||
SHA512 (rust-1.56.1-armv7-unknown-linux-gnueabihf.tar.xz) = fd890ad58a346896a282b78b5138523c0ac06d177f9ec7c6df5262f24e9226be0e0f7a5d67d93d989e73c9380c0292fb7b3c977627cb5b57f48c8621a9b1444a
|
||||
SHA512 (rust-1.56.1-i686-unknown-linux-gnu.tar.xz) = 56e9fa266c0cb668695c202c80b768aba9443b8e594530a3fbdef9ddaff6a37251eca5de584423b51fbee9f0b7712e5de59f6cd0892da4ed036fef5b9e74f27c
|
||||
SHA512 (rust-1.56.1-powerpc64le-unknown-linux-gnu.tar.xz) = 603e9232879e5b9f79f91807f64e088cf657449bd8884c37218585d78c8b6e1919ac8f0aa7b6d38cbe844a89f837170a1bb8e0b4062c8b4aa9cca457eff89bdf
|
||||
SHA512 (rust-1.56.1-s390x-unknown-linux-gnu.tar.xz) = aa0231187d3f096bfb223707e08262ff79f1b6fb9969814fc2385d3a134efc456bb43030723e614163ff27e6d6a779d27b77ad7ed05c80ab24b22fd10f9bc183
|
||||
SHA512 (rust-1.56.1-x86_64-unknown-linux-gnu.tar.xz) = 129c619c3a27b6be903b953efa033731b29436cf83c5229ad1137d2d26571379e5d6e2b3a5704e3002547560e47ae1fa7b6c98990bd2ea482299ad94099bb4b0
|
||||
|
Loading…
Reference in New Issue
Block a user