import rust-1.54.0-2.module+el8.5.0+12254+dc27bae9
This commit is contained in:
parent
9560450cb0
commit
ddad8eeaa4
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/rustc-1.49.0-src.tar.xz
|
SOURCES/rustc-1.54.0-src.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
f6f4d4e41694935511097c3913d9f720d5e606f8 SOURCES/rustc-1.49.0-src.tar.xz
|
1577242bee41fe6c1aee17d47ae791f4bfc1f8c3 SOURCES/rustc-1.54.0-src.tar.xz
|
||||||
|
102
SOURCES/0001-Revert-Auto-merge-of-79547.patch
Normal file
102
SOURCES/0001-Revert-Auto-merge-of-79547.patch
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
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
|
||||||
|
|
26
SOURCES/0001-Use-lld-provided-by-system-for-wasm.patch
Normal file
26
SOURCES/0001-Use-lld-provided-by-system-for-wasm.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 9ac837c237568a6c1c5f0e979fcce208cd9c926a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ivan Mironov <mironov.ivan@gmail.com>
|
||||||
|
Date: Sun, 8 Dec 2019 17:23:08 +0500
|
||||||
|
Subject: [PATCH] Use lld provided by system for wasm
|
||||||
|
|
||||||
|
---
|
||||||
|
compiler/rustc_target/src/spec/wasm_base.rs | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||||
|
index 4c954a1e567c..15c4f1bda5eb 100644
|
||||||
|
--- a/compiler/rustc_target/src/spec/wasm_base.rs
|
||||||
|
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
|
||||||
|
@@ -99,8 +99,7 @@ pub fn options() -> TargetOptions {
|
||||||
|
// arguments just yet
|
||||||
|
limit_rdylib_exports: false,
|
||||||
|
|
||||||
|
- // we use the LLD shipped with the Rust toolchain by default
|
||||||
|
- linker: Some("rust-lld".to_owned()),
|
||||||
|
+ linker: Some("lld".to_owned()),
|
||||||
|
lld_flavor: LldFlavor::Wasm,
|
||||||
|
linker_is_gnu: false,
|
||||||
|
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -1,14 +1,15 @@
|
|||||||
--- rustc-1.48.0-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2020-11-16 06:01:53.000000000 -0800
|
--- rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2021-03-09 10:40:09.755485845 -0800
|
||||||
+++ rustc-1.48.0-src/compiler/rustc_codegen_ssa/src/back/link.rs 2020-11-16 09:37:15.779516797 -0800
|
+++ rustc-beta-src/compiler/rustc_codegen_ssa/src/back/link.rs 2021-03-09 10:44:51.257426181 -0800
|
||||||
@@ -1185,10 +1185,12 @@
|
@@ -1279,11 +1279,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind {
|
fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind {
|
||||||
- let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) {
|
- let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) {
|
||||||
- (CrateType::Executable, false, RelocModel::Pic) => LinkOutputKind::DynamicPicExe,
|
|
||||||
+ // Only use PIE if explicity specified.
|
+ // 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));
|
||||||
+ let kind = match (crate_type, sess.crt_static(Some(crate_type)), explicit_pic) {
|
+ 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, true) => LinkOutputKind::DynamicPicExe,
|
+ (CrateType::Executable, false, true) => LinkOutputKind::DynamicPicExe,
|
||||||
(CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe,
|
(CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe,
|
||||||
- (CrateType::Executable, true, RelocModel::Pic) => LinkOutputKind::StaticPicExe,
|
- (CrateType::Executable, true, RelocModel::Pic) => LinkOutputKind::StaticPicExe,
|
@ -1,6 +1,6 @@
|
|||||||
--- rustc-1.49.0-src/Cargo.lock.orig 2021-01-05 12:45:10.456414612 -0800
|
--- rustc-beta-src/Cargo.lock.orig 2021-06-04 15:56:04.141227630 -0700
|
||||||
+++ rustc-1.49.0-src/Cargo.lock 2021-01-05 12:45:10.458414575 -0800
|
+++ rustc-beta-src/Cargo.lock 2021-06-04 16:03:04.461396826 -0700
|
||||||
@@ -882,7 +882,6 @@
|
@@ -885,7 +885,6 @@
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
@ -8,8 +8,8 @@
|
|||||||
"libz-sys",
|
"libz-sys",
|
||||||
"openssl-sys",
|
"openssl-sys",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
@@ -1728,16 +1727,6 @@
|
@@ -1904,16 +1903,6 @@
|
||||||
]
|
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "libnghttp2-sys"
|
-name = "libnghttp2-sys"
|
||||||
@ -25,20 +25,20 @@
|
|||||||
name = "libz-sys"
|
name = "libz-sys"
|
||||||
version = "1.1.2"
|
version = "1.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
--- rustc-1.49.0-src/src/tools/cargo/Cargo.toml.orig 2021-01-05 12:45:10.458414575 -0800
|
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2021-06-04 15:56:04.143227587 -0700
|
||||||
+++ rustc-1.49.0-src/src/tools/cargo/Cargo.toml 2021-01-05 12:47:25.966928554 -0800
|
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2021-06-04 15:57:56.931857927 -0700
|
||||||
@@ -25,7 +25,7 @@
|
@@ -25,7 +25,7 @@
|
||||||
crates-io = { path = "crates/crates-io", version = "0.31.1" }
|
cargo-util = { path = "crates/cargo-util", version = "0.1.0" }
|
||||||
|
crates-io = { path = "crates/crates-io", version = "0.33.0" }
|
||||||
crossbeam-utils = "0.8"
|
crossbeam-utils = "0.8"
|
||||||
crypto-hash = "0.3.1"
|
|
||||||
-curl = { version = "0.4.23", features = ["http2"] }
|
-curl = { version = "0.4.23", features = ["http2"] }
|
||||||
+curl = { version = "0.4.23", features = [] }
|
+curl = { version = "0.4.23", features = [] }
|
||||||
curl-sys = "0.4.22"
|
curl-sys = "0.4.22"
|
||||||
env_logger = "0.8.1"
|
env_logger = "0.8.1"
|
||||||
pretty_env_logger = { version = "0.4", optional = true }
|
pretty_env_logger = { version = "0.4", optional = true }
|
||||||
--- rustc-1.49.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-12-28 19:03:25.000000000 -0800
|
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2021-05-22 15:22:31.000000000 -0700
|
||||||
+++ rustc-1.49.0-src/src/tools/cargo/src/cargo/core/package.rs 2021-01-05 12:45:10.458414575 -0800
|
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2021-06-04 16:00:03.903190293 -0700
|
||||||
@@ -408,14 +408,8 @@
|
@@ -416,14 +416,8 @@
|
||||||
// Also note that pipelining is disabled as curl authors have indicated
|
// 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
|
// that it's buggy, and we've empirically seen that it's buggy with HTTP
|
||||||
// proxies.
|
// proxies.
|
||||||
@ -46,7 +46,7 @@
|
|||||||
- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
|
- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true);
|
||||||
- multi
|
- multi
|
||||||
- .pipelining(false, multiplexing)
|
- .pipelining(false, multiplexing)
|
||||||
- .chain_err(|| "failed to enable multiplexing/pipelining in curl")?;
|
- .with_context(|| "failed to enable multiplexing/pipelining in curl")?;
|
||||||
-
|
-
|
||||||
- // let's not flood crates.io with connections
|
- // let's not flood crates.io with connections
|
||||||
- multi.set_max_host_connections(2)?;
|
- multi.set_max_host_connections(2)?;
|
||||||
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
Ok(PackageSet {
|
Ok(PackageSet {
|
||||||
packages: package_ids
|
packages: package_ids
|
||||||
@@ -584,7 +578,7 @@
|
@@ -596,7 +590,7 @@
|
||||||
macro_rules! try_old_curl {
|
macro_rules! try_old_curl {
|
||||||
($e:expr, $msg:expr) => {
|
($e:expr, $msg:expr) => {
|
||||||
let result = $e;
|
let result = $e;
|
193
SPECS/rust.spec
193
SPECS/rust.spec
@ -10,23 +10,36 @@
|
|||||||
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
|
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
|
||||||
# or nightly wants some beta-YYYY-MM-DD
|
# or nightly wants some beta-YYYY-MM-DD
|
||||||
# Note that cargo matches the program version here, not its crate version.
|
# Note that cargo matches the program version here, not its crate version.
|
||||||
%global bootstrap_rust 1.48.0
|
%global bootstrap_rust 1.53.0
|
||||||
%global bootstrap_cargo 1.48.0
|
%global bootstrap_cargo 1.53.0
|
||||||
%global bootstrap_channel 1.48.0
|
%global bootstrap_channel 1.53.0
|
||||||
%global bootstrap_date 2020-11-19
|
%global bootstrap_date 2021-06-17
|
||||||
|
|
||||||
# Only the specified arches will use bootstrap binaries.
|
# Only the specified arches will use bootstrap binaries.
|
||||||
#global bootstrap_arches %%{rust_arches}
|
#global bootstrap_arches %%{rust_arches}
|
||||||
|
|
||||||
|
# Define a space-separated list of targets to ship rust-std-static-$triple for
|
||||||
|
# cross-compilation. The packages are noarch, but they're not fully
|
||||||
|
# reproducible between hosts, so only x86_64 actually builds it.
|
||||||
|
#ifarch x86_64
|
||||||
|
# FIX: Except on RHEL8 modules, we can't filter a noarch package from shipping
|
||||||
|
# on certain arches, namely s390x for its lack of lld. So we need to make it an
|
||||||
|
# arch-specific package only for the supported arches.
|
||||||
|
%ifnarch s390x
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||||
|
%global cross_targets wasm32-unknown-unknown
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
# Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.
|
# Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.
|
||||||
%bcond_with llvm_static
|
%bcond_with llvm_static
|
||||||
|
|
||||||
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM
|
# We can also choose to just use Rust's bundled LLVM, in case the system LLVM
|
||||||
# is insufficient. Rust currently requires LLVM 8.0+.
|
# is insufficient. Rust currently requires LLVM 10.0+.
|
||||||
%bcond_with bundled_llvm
|
%bcond_with bundled_llvm
|
||||||
|
|
||||||
# Requires stable libgit2 1.0
|
# Requires stable libgit2 1.1
|
||||||
%if 0%{?fedora} >= 32
|
%if 0%{?fedora} >= 34
|
||||||
%bcond_with bundled_libgit2
|
%bcond_with bundled_libgit2
|
||||||
%else
|
%else
|
||||||
%bcond_without bundled_libgit2
|
%bcond_without bundled_libgit2
|
||||||
@ -53,8 +66,8 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.49.0
|
Version: 1.54.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?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)
|
||||||
# ^ written as: (rust itself) and (bundled libraries)
|
# ^ written as: (rust itself) and (bundled libraries)
|
||||||
@ -68,6 +81,13 @@ ExclusiveArch: %{rust_arches}
|
|||||||
%endif
|
%endif
|
||||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||||
|
|
||||||
|
# This internal rust-abi change broke s390x -- revert for now.
|
||||||
|
# https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032
|
||||||
|
Patch1: 0001-Revert-Auto-merge-of-79547.patch
|
||||||
|
|
||||||
|
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
|
||||||
|
Patch2: 0001-Use-lld-provided-by-system-for-wasm.patch
|
||||||
|
|
||||||
### RHEL-specific patches below ###
|
### RHEL-specific patches below ###
|
||||||
|
|
||||||
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
|
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
|
||||||
@ -75,11 +95,11 @@ Patch100: rustc-1.48.0-disable-libssh2.patch
|
|||||||
|
|
||||||
# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys
|
# 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.
|
# will try to build it statically -- instead we turn off the feature.
|
||||||
Patch101: rustc-1.49.0-disable-http2.patch
|
Patch101: rustc-1.53.0-disable-http2.patch
|
||||||
|
|
||||||
# kernel rh1410097 causes too-small stacks for PIE.
|
# kernel rh1410097 causes too-small stacks for PIE.
|
||||||
# (affects RHEL6 kernels when building for RHEL7)
|
# (affects RHEL6 kernels when building for RHEL7)
|
||||||
Patch102: rustc-1.48.0-no-default-pie.patch
|
Patch102: rustc-1.51.0-no-default-pie.patch
|
||||||
|
|
||||||
|
|
||||||
# Get the Rust triple for any arch.
|
# Get the Rust triple for any arch.
|
||||||
@ -149,7 +169,7 @@ BuildRequires: pkgconfig(openssl)
|
|||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
|
||||||
%if %without bundled_libgit2
|
%if %without bundled_libgit2
|
||||||
BuildRequires: pkgconfig(libgit2) >= 1.0.0
|
BuildRequires: pkgconfig(libgit2) >= 1.1.0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{without disabled_libssh2}
|
%if %{without disabled_libssh2}
|
||||||
@ -161,12 +181,12 @@ BuildRequires: pkgconfig(libssh2) >= 1.6.0
|
|||||||
BuildRequires: %{python}
|
BuildRequires: %{python}
|
||||||
|
|
||||||
%if %with bundled_llvm
|
%if %with bundled_llvm
|
||||||
BuildRequires: cmake3 >= 3.4.3
|
BuildRequires: cmake3 >= 3.13.4
|
||||||
Provides: bundled(llvm) = 11.0.0
|
Provides: bundled(llvm) = 12.0.0
|
||||||
%else
|
%else
|
||||||
BuildRequires: cmake >= 2.8.11
|
BuildRequires: cmake >= 2.8.11
|
||||||
%if 0%{?epel} == 7
|
%if 0%{?epel} == 7
|
||||||
%global llvm llvm9.0
|
%global llvm llvm11
|
||||||
%endif
|
%endif
|
||||||
%if %defined llvm
|
%if %defined llvm
|
||||||
%global llvm_root %{_libdir}/%{llvm}
|
%global llvm_root %{_libdir}/%{llvm}
|
||||||
@ -174,7 +194,7 @@ BuildRequires: cmake >= 2.8.11
|
|||||||
%global llvm llvm
|
%global llvm llvm
|
||||||
%global llvm_root %{_prefix}
|
%global llvm_root %{_prefix}
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: %{llvm}-devel >= 9.0
|
BuildRequires: %{llvm}-devel >= 10.0
|
||||||
%if %with llvm_static
|
%if %with llvm_static
|
||||||
BuildRequires: %{llvm}-static
|
BuildRequires: %{llvm}-static
|
||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
@ -199,6 +219,14 @@ Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
|
|||||||
# https://github.com/rust-lang/rust/issues/11937
|
# https://github.com/rust-lang/rust/issues/11937
|
||||||
Requires: /usr/bin/cc
|
Requires: /usr/bin/cc
|
||||||
|
|
||||||
|
%if 0%{?epel} == 7
|
||||||
|
%global devtoolset_name devtoolset-9
|
||||||
|
BuildRequires: %{devtoolset_name}-gcc
|
||||||
|
BuildRequires: %{devtoolset_name}-gcc-c++
|
||||||
|
%global __cc /opt/rh/%{devtoolset_name}/root/usr/bin/gcc
|
||||||
|
%global __cxx /opt/rh/%{devtoolset_name}/root/usr/bin/g++
|
||||||
|
%endif
|
||||||
|
|
||||||
# ALL Rust libraries are private, because they don't keep an ABI.
|
# ALL Rust libraries are private, because they don't keep an ABI.
|
||||||
%global _privatelibs lib(.*-[[:xdigit:]]{16}*|rustc.*)[.]so.*
|
%global _privatelibs lib(.*-[[:xdigit:]]{16}*|rustc.*)[.]so.*
|
||||||
%global __provides_exclude ^(%{_privatelibs})$
|
%global __provides_exclude ^(%{_privatelibs})$
|
||||||
@ -227,6 +255,19 @@ Requires: /usr/bin/cc
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# We're going to override --libdir when configuring to get rustlib into a
|
||||||
|
# common path, but we'll fix the shared libraries during install.
|
||||||
|
%global common_libdir %{_prefix}/lib
|
||||||
|
%global rustlibdir %{common_libdir}/rustlib
|
||||||
|
|
||||||
|
%if %defined cross_targets
|
||||||
|
# brp-strip-static-archive breaks the archive index for wasm
|
||||||
|
%global __os_install_post \
|
||||||
|
%__os_install_post \
|
||||||
|
find %{buildroot}%{rustlibdir} -type f -path '*/wasm*/lib/*.rlib' -exec llvm-ranlib '{}' ';' \
|
||||||
|
%{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Rust is a systems programming language that runs blazingly fast, prevents
|
Rust is a systems programming language that runs blazingly fast, prevents
|
||||||
segfaults, and guarantees thread safety.
|
segfaults, and guarantees thread safety.
|
||||||
@ -241,6 +282,33 @@ Summary: Standard library for Rust
|
|||||||
This package includes the standard libraries for building applications
|
This package includes the standard libraries for building applications
|
||||||
written in Rust.
|
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,
|
||||||
|
}
|
||||||
|
local s = string.gsub([[
|
||||||
|
%package std-static-{{triple}}
|
||||||
|
Summary: Standard library for Rust
|
||||||
|
# FIX: we can't be noarch while excluding s390x for lack of lld
|
||||||
|
# BuildArch: noarch
|
||||||
|
{{requires}}
|
||||||
|
|
||||||
|
%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
|
||||||
|
end}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package debugger-common
|
%package debugger-common
|
||||||
Summary: Common debugger pretty printers for Rust
|
Summary: Common debugger pretty printers for Rust
|
||||||
@ -397,6 +465,9 @@ test -f '%{local_rust_root}/bin/rustc'
|
|||||||
|
|
||||||
%setup -q -n %{rustc_package}
|
%setup -q -n %{rustc_package}
|
||||||
|
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%if %with disabled_libssh2
|
%if %with disabled_libssh2
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%endif
|
%endif
|
||||||
@ -481,11 +552,6 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
|
|||||||
%build
|
%build
|
||||||
export %{rust_env}
|
export %{rust_env}
|
||||||
|
|
||||||
# We're going to override --libdir when configuring to get rustlib into a
|
|
||||||
# common path, but we'll fix the shared libraries during install.
|
|
||||||
%global common_libdir %{_prefix}/lib
|
|
||||||
%global rustlibdir %{common_libdir}/rustlib
|
|
||||||
|
|
||||||
%ifarch %{arm} %{ix86} s390x
|
%ifarch %{arm} %{ix86} s390x
|
||||||
# full debuginfo is exhausting memory; just do libstd for now
|
# full debuginfo is exhausting memory; just do libstd for now
|
||||||
# https://github.com/rust-lang/rust/issues/45854
|
# https://github.com/rust-lang/rust/issues/45854
|
||||||
@ -500,13 +566,6 @@ export %{rust_env}
|
|||||||
%define enable_debuginfo --debuginfo-level=2
|
%define enable_debuginfo --debuginfo-level=2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# We want the best optimization for std, but it caused problems for rpm-ostree
|
|
||||||
# on ppc64le to have all of the compiler_builtins in a single object:
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1713090
|
|
||||||
%ifnarch %{power64}
|
|
||||||
%define codegen_units_std --set rust.codegen-units-std=1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Some builders have relatively little memory for their CPU count.
|
# Some builders have relatively little memory for their CPU count.
|
||||||
# At least 2GB per CPU is a good rule of thumb for building rustc.
|
# At least 2GB per CPU is a good rule of thumb for building rustc.
|
||||||
ncpus=$(/usr/bin/getconf _NPROCESSORS_ONLN)
|
ncpus=$(/usr/bin/getconf _NPROCESSORS_ONLN)
|
||||||
@ -518,6 +577,9 @@ fi
|
|||||||
%configure --disable-option-checking \
|
%configure --disable-option-checking \
|
||||||
--libdir=%{common_libdir} \
|
--libdir=%{common_libdir} \
|
||||||
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
|
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
|
||||||
|
--set target.%{rust_triple}.linker=%{__cc} \
|
||||||
|
--set target.%{rust_triple}.cc=%{__cc} \
|
||||||
|
--set target.%{rust_triple}.cxx=%{__cxx} \
|
||||||
--python=%{python} \
|
--python=%{python} \
|
||||||
--local-rust-root=%{local_rust_root} \
|
--local-rust-root=%{local_rust_root} \
|
||||||
%{!?with_bundled_llvm: --llvm-root=%{llvm_root} \
|
%{!?with_bundled_llvm: --llvm-root=%{llvm_root} \
|
||||||
@ -525,22 +587,38 @@ fi
|
|||||||
%{!?with_llvm_static: --enable-llvm-link-shared } } \
|
%{!?with_llvm_static: --enable-llvm-link-shared } } \
|
||||||
--disable-rpath \
|
--disable-rpath \
|
||||||
%{enable_debuginfo} \
|
%{enable_debuginfo} \
|
||||||
|
--set rust.codegen-units-std=1 \
|
||||||
--enable-extended \
|
--enable-extended \
|
||||||
--tools=analysis,cargo,clippy,rls,rustfmt,src \
|
--tools=analysis,cargo,clippy,rls,rustfmt,src \
|
||||||
--enable-vendor \
|
--enable-vendor \
|
||||||
--enable-verbose-tests \
|
--enable-verbose-tests \
|
||||||
%{?codegen_units_std} \
|
%{?codegen_units_std} \
|
||||||
--release-channel=%{channel}
|
--release-channel=%{channel} \
|
||||||
|
--release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}"
|
||||||
|
|
||||||
%{python} ./x.py build -j "$ncpus" --stage 2
|
%{python} ./x.py build -j "$ncpus" --stage 2
|
||||||
%{python} ./x.py doc --stage 2
|
%{python} ./x.py doc --stage 2
|
||||||
|
|
||||||
|
%if %defined cross_targets
|
||||||
|
for triple in %{cross_targets}; do
|
||||||
|
%{python} ./x.py build --stage 2 --target=$triple std
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export %{rust_env}
|
export %{rust_env}
|
||||||
|
|
||||||
DESTDIR=%{buildroot} %{python} ./x.py install
|
DESTDIR=%{buildroot} %{python} ./x.py install
|
||||||
|
|
||||||
|
%if %defined cross_targets
|
||||||
|
for triple in %{cross_targets}; do
|
||||||
|
DESTDIR=%{buildroot} %{python} ./x.py install --target=$triple std
|
||||||
|
done
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# These are transient files used by x.py dist and install
|
||||||
|
rm -rf ./build/dist/ ./build/tmp/
|
||||||
|
|
||||||
# Make sure the shared libraries are in the proper libdir
|
# Make sure the shared libraries are in the proper libdir
|
||||||
%if "%{_libdir}" != "%{common_libdir}"
|
%if "%{_libdir}" != "%{common_libdir}"
|
||||||
mkdir -p %{buildroot}%{_libdir}
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
@ -604,13 +682,21 @@ rm -f %{buildroot}%{_bindir}/rust-lldb
|
|||||||
rm -f %{buildroot}%{rustlibdir}/etc/lldb_*
|
rm -f %{buildroot}%{rustlibdir}/etc/lldb_*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp)
|
||||||
|
rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export %{rust_env}
|
export %{rust_env}
|
||||||
|
|
||||||
# The results are not stable on koji, so mask errors and just log it.
|
# 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 || :
|
%{python} ./x.py test --no-fail-fast --stage 2 || :
|
||||||
|
rm -rf "./build/%{rust_triple}/test/"
|
||||||
|
|
||||||
%{python} ./x.py test --no-fail-fast --stage 2 cargo || :
|
%{python} ./x.py test --no-fail-fast --stage 2 cargo || :
|
||||||
|
rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
|
||||||
|
|
||||||
%{python} ./x.py test --no-fail-fast --stage 2 clippy || :
|
%{python} ./x.py test --no-fail-fast --stage 2 clippy || :
|
||||||
%{python} ./x.py test --no-fail-fast --stage 2 rls || :
|
%{python} ./x.py test --no-fail-fast --stage 2 rls || :
|
||||||
%{python} ./x.py test --no-fail-fast --stage 2 rustfmt || :
|
%{python} ./x.py test --no-fail-fast --stage 2 rustfmt || :
|
||||||
@ -640,6 +726,26 @@ export %{rust_env}
|
|||||||
%{rustlibdir}/%{rust_triple}/lib/*.rlib
|
%{rustlibdir}/%{rust_triple}/lib/*.rlib
|
||||||
|
|
||||||
|
|
||||||
|
%if %defined cross_targets
|
||||||
|
%{lua: do
|
||||||
|
for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do
|
||||||
|
local subs = {
|
||||||
|
triple = triple,
|
||||||
|
rustlibdir = rpm.expand("%{rustlibdir}"),
|
||||||
|
}
|
||||||
|
local s = string.gsub([[
|
||||||
|
%files std-static-{{triple}}
|
||||||
|
%dir {{rustlibdir}}
|
||||||
|
%dir {{rustlibdir}}/{{triple}}
|
||||||
|
%dir {{rustlibdir}}/{{triple}}/lib
|
||||||
|
{{rustlibdir}}/{{triple}}/lib/*.rlib
|
||||||
|
]], "{{(%w+)}}", subs)
|
||||||
|
print(s)
|
||||||
|
end
|
||||||
|
end}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files debugger-common
|
%files debugger-common
|
||||||
%dir %{rustlibdir}
|
%dir %{rustlibdir}
|
||||||
%dir %{rustlibdir}/etc
|
%dir %{rustlibdir}/etc
|
||||||
@ -670,6 +776,7 @@ export %{rust_env}
|
|||||||
%{_docdir}/%{name}/html/*.png
|
%{_docdir}/%{name}/html/*.png
|
||||||
%{_docdir}/%{name}/html/*.svg
|
%{_docdir}/%{name}/html/*.svg
|
||||||
%{_docdir}/%{name}/html/*.woff
|
%{_docdir}/%{name}/html/*.woff
|
||||||
|
%{_docdir}/%{name}/html/*.woff2
|
||||||
%license %{_docdir}/%{name}/html/*.txt
|
%license %{_docdir}/%{name}/html/*.txt
|
||||||
%license %{_docdir}/%{name}/html/*.md
|
%license %{_docdir}/%{name}/html/*.md
|
||||||
|
|
||||||
@ -678,6 +785,7 @@ export %{rust_env}
|
|||||||
%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY
|
%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY
|
||||||
%doc src/tools/cargo/README.md
|
%doc src/tools/cargo/README.md
|
||||||
%{_bindir}/cargo
|
%{_bindir}/cargo
|
||||||
|
%{_libexecdir}/cargo*
|
||||||
%{_mandir}/man1/cargo*.1*
|
%{_mandir}/man1/cargo*.1*
|
||||||
%{_sysconfdir}/bash_completion.d/cargo
|
%{_sysconfdir}/bash_completion.d/cargo
|
||||||
%{_datadir}/zsh/site-functions/_cargo
|
%{_datadir}/zsh/site-functions/_cargo
|
||||||
@ -721,6 +829,33 @@ export %{rust_env}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 17 2021 Josh Stone <jistone@redhat.com> - 1.54.0-2
|
||||||
|
- Make std-static-wasm* arch-specific to avoid s390x.
|
||||||
|
|
||||||
|
* Thu Jul 29 2021 Josh Stone <jistone@redhat.com> - 1.54.0-1
|
||||||
|
- Update to 1.54.0.
|
||||||
|
|
||||||
|
* Tue Jul 20 2021 Josh Stone <jistone@redhat.com> - 1.53.0-2
|
||||||
|
- Use llvm-ranlib to fix wasm archives.
|
||||||
|
|
||||||
|
* Mon Jun 21 2021 Josh Stone <jistone@redhat.com> - 1.53.0-1
|
||||||
|
- Update to 1.53.0.
|
||||||
|
|
||||||
|
* Tue Jun 15 2021 Josh Stone <jistone@redhat.com> - 1.52.1-2
|
||||||
|
- Set rust.codegen-units-std=1 for all targets again.
|
||||||
|
- Add rust-std-static-wasm32-unknown-unknown.
|
||||||
|
|
||||||
|
* Tue May 25 2021 Josh Stone <jistone@redhat.com> - 1.52.1-1
|
||||||
|
- Update to 1.52.1. Includes security fixes for CVE-2020-36323,
|
||||||
|
CVE-2021-28876, CVE-2021-28878, CVE-2021-28879, and CVE-2021-31162.
|
||||||
|
|
||||||
|
* Mon May 24 2021 Josh Stone <jistone@redhat.com> - 1.51.0-1
|
||||||
|
- Update to 1.51.0. Update to 1.51.0. Includes security fixes for
|
||||||
|
CVE-2021-28875 and CVE-2021-28877.
|
||||||
|
|
||||||
|
* Mon May 24 2021 Josh Stone <jistone@redhat.com> - 1.50.0-1
|
||||||
|
- Update to 1.50.0.
|
||||||
|
|
||||||
* Wed Jan 13 2021 Josh Stone <jistone@redhat.com> - 1.49.0-1
|
* Wed Jan 13 2021 Josh Stone <jistone@redhat.com> - 1.49.0-1
|
||||||
- Update to 1.49.0.
|
- Update to 1.49.0.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user