import rust-1.60.0-1.module+el8.7.0+15036+59b57ab5
This commit is contained in:
parent
5f37c588cb
commit
748cb6770f
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
SOURCES/rustc-1.58.1-src.tar.xz
|
SOURCES/rustc-1.60.0-src.tar.xz
|
||||||
SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz
|
SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
783cb359829e7ea508deae659837f9bb360e46c8 SOURCES/rustc-1.58.1-src.tar.xz
|
b08d48b4b76e9746411a89d88e69b0b8a208ee92 SOURCES/rustc-1.60.0-src.tar.xz
|
||||||
b8865d1192852214d6d9b0a0957d4b36c16832aa SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz
|
b8865d1192852214d6d9b0a0957d4b36c16832aa SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz
|
||||||
|
34
SOURCES/rust-pr94505-mono-item-sort-local.patch
Normal file
34
SOURCES/rust-pr94505-mono-item-sort-local.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
diff --git a/compiler/rustc_middle/src/mir/mono.rs b/compiler/rustc_middle/src/mir/mono.rs
|
||||||
|
index 892808386dee..13c325a14e40 100644
|
||||||
|
--- a/compiler/rustc_middle/src/mir/mono.rs
|
||||||
|
+++ b/compiler/rustc_middle/src/mir/mono.rs
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||||
|
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
|
||||||
|
use rustc_hir::ItemId;
|
||||||
|
+use rustc_index::vec::Idx;
|
||||||
|
use rustc_query_system::ich::{NodeIdHashingMode, StableHashingContext};
|
||||||
|
use rustc_session::config::OptLevel;
|
||||||
|
use rustc_span::source_map::Span;
|
||||||
|
@@ -380,7 +381,7 @@ fn item_sort_key<'tcx>(tcx: TyCtxt<'tcx>, item: MonoItem<'tcx>) -> ItemSortKey<'
|
||||||
|
// instances into account. The others don't matter for
|
||||||
|
// the codegen tests and can even make item order
|
||||||
|
// unstable.
|
||||||
|
- InstanceDef::Item(def) => Some(def.did.index.as_usize()),
|
||||||
|
+ InstanceDef::Item(def) => def.did.as_local().map(Idx::index),
|
||||||
|
InstanceDef::VtableShim(..)
|
||||||
|
| InstanceDef::ReifyShim(..)
|
||||||
|
| InstanceDef::Intrinsic(..)
|
||||||
|
@@ -391,10 +392,8 @@ fn item_sort_key<'tcx>(tcx: TyCtxt<'tcx>, item: MonoItem<'tcx>) -> ItemSortKey<'
|
||||||
|
| InstanceDef::CloneShim(..) => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- MonoItem::Static(def_id) => Some(def_id.index.as_usize()),
|
||||||
|
- MonoItem::GlobalAsm(item_id) => {
|
||||||
|
- Some(item_id.def_id.to_def_id().index.as_usize())
|
||||||
|
- }
|
||||||
|
+ MonoItem::Static(def_id) => def_id.as_local().map(Idx::index),
|
||||||
|
+ MonoItem::GlobalAsm(item_id) => Some(item_id.def_id.index()),
|
||||||
|
},
|
||||||
|
item.symbol_name(tcx),
|
||||||
|
)
|
@ -1,6 +1,6 @@
|
|||||||
--- rustc-1.56.0-src/Cargo.lock.orig 2021-10-18 02:52:36.000000000 -0700
|
--- rustc-1.59.0-src/Cargo.lock.orig 2022-02-21 18:48:37.000000000 -0800
|
||||||
+++ rustc-1.56.0-src/Cargo.lock 2021-10-19 18:00:47.999793566 -0700
|
+++ rustc-1.59.0-src/Cargo.lock 2022-02-22 10:16:10.381962862 -0800
|
||||||
@@ -1895,7 +1895,6 @@
|
@@ -1935,7 +1935,6 @@
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
@ -8,14 +8,14 @@
|
|||||||
"libz-sys",
|
"libz-sys",
|
||||||
"openssl-sys",
|
"openssl-sys",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
@@ -1918,20 +1917,6 @@
|
@@ -1968,20 +1967,6 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
-name = "libssh2-sys"
|
-name = "libssh2-sys"
|
||||||
-version = "0.2.19"
|
-version = "0.2.23"
|
||||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
-checksum = "ca46220853ba1c512fc82826d0834d87b06bcd3c2a42241b7de72f3d2fe17056"
|
-checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca"
|
||||||
-dependencies = [
|
-dependencies = [
|
||||||
- "cc",
|
- "cc",
|
||||||
- "libc",
|
- "libc",
|
||||||
@ -29,9 +29,9 @@
|
|||||||
name = "libz-sys"
|
name = "libz-sys"
|
||||||
version = "1.1.3"
|
version = "1.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
--- rustc-1.56.0-src/vendor/git2/Cargo.toml.orig 2021-10-18 04:05:54.000000000 -0700
|
--- rustc-1.59.0-src/vendor/git2/Cargo.toml.orig 2022-02-21 20:14:37.000000000 -0800
|
||||||
+++ rustc-1.56.0-src/vendor/git2/Cargo.toml 2021-10-19 17:57:37.960500359 -0700
|
+++ rustc-1.59.0-src/vendor/git2/Cargo.toml 2022-02-22 10:12:23.021772490 -0800
|
||||||
@@ -52,7 +52,7 @@
|
@@ -51,7 +51,7 @@
|
||||||
version = "0.1.39"
|
version = "0.1.39"
|
||||||
|
|
||||||
[features]
|
[features]
|
@ -1,6 +1,6 @@
|
|||||||
--- rustc-1.58.0-src/Cargo.lock.orig 2022-01-11 16:13:10.125323813 -0800
|
--- rustc-beta-src/Cargo.lock.orig 2022-03-18 10:27:54.154949492 -0700
|
||||||
+++ rustc-1.58.0-src/Cargo.lock 2022-01-11 16:22:54.313011908 -0800
|
+++ rustc-beta-src/Cargo.lock 2022-03-18 10:27:54.156949449 -0700
|
||||||
@@ -909,7 +909,6 @@
|
@@ -958,7 +958,6 @@
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
@ -8,7 +8,7 @@
|
|||||||
"libz-sys",
|
"libz-sys",
|
||||||
"openssl-sys",
|
"openssl-sys",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
@@ -1927,16 +1926,6 @@
|
@@ -2009,16 +2008,6 @@
|
||||||
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -25,20 +25,20 @@
|
|||||||
name = "libz-sys"
|
name = "libz-sys"
|
||||||
version = "1.1.3"
|
version = "1.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
--- rustc-1.58.0-src/src/tools/cargo/Cargo.toml.orig 2022-01-11 16:13:10.127323771 -0800
|
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2022-03-18 10:27:54.156949449 -0700
|
||||||
+++ rustc-1.58.0-src/src/tools/cargo/Cargo.toml 2022-01-11 16:14:50.721203730 -0800
|
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2022-03-18 10:29:15.967184238 -0700
|
||||||
@@ -22,7 +22,7 @@
|
@@ -22,7 +22,7 @@
|
||||||
cargo-util = { path = "crates/cargo-util", version = "0.1.1" }
|
cargo-util = { path = "crates/cargo-util", version = "0.1.2" }
|
||||||
crates-io = { path = "crates/crates-io", version = "0.33.0" }
|
crates-io = { path = "crates/crates-io", version = "0.34.0" }
|
||||||
crossbeam-utils = "0.8"
|
crossbeam-utils = "0.8"
|
||||||
-curl = { version = "0.4.41", features = ["http2"] }
|
-curl = { version = "0.4.41", features = ["http2"] }
|
||||||
+curl = { version = "0.4.41", features = [] }
|
+curl = { version = "0.4.41", features = [] }
|
||||||
curl-sys = "0.4.50"
|
curl-sys = "0.4.50"
|
||||||
env_logger = "0.9.0"
|
env_logger = "0.9.0"
|
||||||
pretty_env_logger = { version = "0.4", optional = true }
|
pretty_env_logger = { version = "0.4", optional = true }
|
||||||
--- rustc-1.58.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2022-01-11 03:18:44.000000000 -0800
|
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2022-03-14 11:49:37.000000000 -0700
|
||||||
+++ rustc-1.58.0-src/src/tools/cargo/src/cargo/core/package.rs 2022-01-11 16:13:10.127323771 -0800
|
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2022-03-18 10:27:54.156949449 -0700
|
||||||
@@ -419,14 +419,8 @@
|
@@ -412,14 +412,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.
|
||||||
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
Ok(PackageSet {
|
Ok(PackageSet {
|
||||||
packages: package_ids
|
packages: package_ids
|
||||||
@@ -655,7 +649,7 @@
|
@@ -648,7 +642,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;
|
15
SOURCES/wasi-libc-clang-14-compat.patch
Normal file
15
SOURCES/wasi-libc-clang-14-compat.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index a93b10a6757a..518bab0aaf78 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -538,6 +538,10 @@ check-symbols: startup_files libc
|
||||||
|
-U__GNUC_PATCHLEVEL__ \
|
||||||
|
-U__VERSION__ \
|
||||||
|
-U__FLOAT128__ \
|
||||||
|
+ -U__NO_MATH_ERRNO__ \
|
||||||
|
+ -U__BITINT_MAXWIDTH__ \
|
||||||
|
+ | grep -vE '^#define __(BOOL|INT|LLONG|LONG|SHRT)_WIDTH__' \
|
||||||
|
+ | grep -vE '^#define __INT_(FAST|LEAST)(8|16|32|64)_WIDTH__' \
|
||||||
|
| sed -e 's/__[[:upper:][:digit:]]*_ATOMIC_\([[:upper:][:digit:]_]*\)_LOCK_FREE/__compiler_ATOMIC_\1_LOCK_FREE/' \
|
||||||
|
| grep -v '^#define __FLT16_' \
|
||||||
|
> "$(SYSROOT_SHARE)/predefined-macros.txt"
|
116
SPECS/rust.spec
116
SPECS/rust.spec
@ -6,15 +6,17 @@
|
|||||||
%{!?channel: %global channel stable}
|
%{!?channel: %global channel stable}
|
||||||
|
|
||||||
# To bootstrap from scratch, set the channel and date from src/stage0.json
|
# To bootstrap from scratch, set the channel and date from src/stage0.json
|
||||||
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
|
# e.g. 1.59.0 wants rustc: 1.58.0-2022-01-13
|
||||||
# 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.
|
%global bootstrap_version 1.59.0
|
||||||
%global bootstrap_rust 1.57.0
|
%global bootstrap_channel 1.59.0
|
||||||
%global bootstrap_cargo 1.57.0
|
%global bootstrap_date 2022-02-24
|
||||||
%global bootstrap_channel 1.57.0
|
|
||||||
%global bootstrap_date 2021-12-02
|
|
||||||
|
|
||||||
# Only the specified arches will use bootstrap binaries.
|
# Only the specified arches will use bootstrap binaries.
|
||||||
|
# NOTE: Those binaries used to be uploaded with every new release, but that was
|
||||||
|
# a waste of lookaside cache space when they're most often unused.
|
||||||
|
# Run "spectool -g rust.spec" after changing this and then "fedpkg upload" to
|
||||||
|
# add them to sources. Remember to remove them again after the bootstrap build!
|
||||||
#global bootstrap_arches %%{rust_arches}
|
#global bootstrap_arches %%{rust_arches}
|
||||||
|
|
||||||
# Define a space-separated list of targets to ship rust-std-static-$triple for
|
# Define a space-separated list of targets to ship rust-std-static-$triple for
|
||||||
@ -47,11 +49,13 @@
|
|||||||
# 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 12.0+.
|
# is insufficient. Rust currently requires LLVM 12.0+.
|
||||||
%global min_llvm_version 12.0.0
|
%global min_llvm_version 12.0.0
|
||||||
%global bundled_llvm_version 13.0.0
|
%global bundled_llvm_version 14.0.0
|
||||||
%bcond_with bundled_llvm
|
%bcond_with bundled_llvm
|
||||||
|
|
||||||
# Requires stable libgit2 1.3
|
# Requires stable libgit2 1.3, and not the next minor soname change.
|
||||||
|
# This needs to be consistent with the bindings in vendor/libgit2-sys.
|
||||||
%global min_libgit2_version 1.3.0
|
%global min_libgit2_version 1.3.0
|
||||||
|
%global next_libgit2_version 1.4.0~
|
||||||
%global bundled_libgit2_version 1.3.0
|
%global bundled_libgit2_version 1.3.0
|
||||||
%if 0%{?fedora} >= 36
|
%if 0%{?fedora} >= 36
|
||||||
%bcond_with bundled_libgit2
|
%bcond_with bundled_libgit2
|
||||||
@ -82,7 +86,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: rust
|
Name: rust
|
||||||
Version: 1.58.1
|
Version: 1.60.0
|
||||||
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)
|
||||||
@ -102,14 +106,22 @@ Source1: %{wasi_libc_source}
|
|||||||
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
|
# By default, rust tries to use "rust-lld" as a linker for WebAssembly.
|
||||||
Patch1: 0001-Use-lld-provided-by-system-for-wasm.patch
|
Patch1: 0001-Use-lld-provided-by-system-for-wasm.patch
|
||||||
|
|
||||||
|
# This regressed in 1.59, hanging builds on s390x, rhbz#2058803
|
||||||
|
# https://github.com/rust-lang/rust/pull/94505
|
||||||
|
Patch2: rust-pr94505-mono-item-sort-local.patch
|
||||||
|
|
||||||
|
# Clang 14 adds new builtin macros that wasi-libc doesn't expect yet
|
||||||
|
# See https://github.com/WebAssembly/wasi-libc/pull/265
|
||||||
|
Patch3: wasi-libc-clang-14-compat.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)
|
||||||
Patch100: rustc-1.56.0-disable-libssh2.patch
|
Patch100: rustc-1.59.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.58.0-disable-http2.patch
|
Patch101: rustc-1.60.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)
|
||||||
@ -142,31 +154,35 @@ end}
|
|||||||
for arch in string.gmatch(rpm.expand("%{bootstrap_arches}"), "%S+") do
|
for arch in string.gmatch(rpm.expand("%{bootstrap_arches}"), "%S+") do
|
||||||
table.insert(bootstrap_arches, arch)
|
table.insert(bootstrap_arches, arch)
|
||||||
end
|
end
|
||||||
local base = rpm.expand("https://static.rust-lang.org/dist/%{bootstrap_date}"
|
local base = rpm.expand("https://static.rust-lang.org/dist/%{bootstrap_date}")
|
||||||
.."/rust-%{bootstrap_channel}")
|
local channel = rpm.expand("%{bootstrap_channel}")
|
||||||
local target_arch = rpm.expand("%{_target_cpu}")
|
local target_arch = rpm.expand("%{_target_cpu}")
|
||||||
for i, arch in ipairs(bootstrap_arches) do
|
for i, arch in ipairs(bootstrap_arches) do
|
||||||
i = 100 + i
|
i = 100 + i * 3
|
||||||
print(string.format("Source%d: %s-%s.tar.xz\n",
|
local suffix = channel.."-"..rust_triple(arch)
|
||||||
i, base, rust_triple(arch)))
|
print(string.format("Source%d: %s/cargo-%s.tar.xz\n", i, base, suffix))
|
||||||
|
print(string.format("Source%d: %s/rustc-%s.tar.xz\n", i+1, base, suffix))
|
||||||
|
print(string.format("Source%d: %s/rust-std-%s.tar.xz\n", i+2, base, suffix))
|
||||||
if arch == target_arch then
|
if arch == target_arch then
|
||||||
rpm.define("bootstrap_source "..i)
|
rpm.define("bootstrap_source_cargo "..i)
|
||||||
|
rpm.define("bootstrap_source_rustc "..i+1)
|
||||||
|
rpm.define("bootstrap_source_std "..i+2)
|
||||||
|
rpm.define("bootstrap_suffix "..suffix)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end}
|
end}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch %{bootstrap_arches}
|
%ifarch %{bootstrap_arches}
|
||||||
%global bootstrap_root rust-%{bootstrap_channel}-%{rust_triple}
|
%global local_rust_root %{_builddir}/rust-%{bootstrap_suffix}
|
||||||
%global local_rust_root %{_builddir}/%{bootstrap_root}/usr
|
Provides: bundled(%{name}-bootstrap) = %{bootstrap_version}
|
||||||
Provides: bundled(%{name}-bootstrap) = %{bootstrap_rust}
|
|
||||||
%else
|
%else
|
||||||
BuildRequires: cargo >= %{bootstrap_cargo}
|
BuildRequires: cargo >= %{bootstrap_version}
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||||
BuildRequires: %{name} >= %{bootstrap_rust}
|
BuildRequires: %{name} >= %{bootstrap_version}
|
||||||
BuildConflicts: %{name} > %{version}
|
BuildConflicts: %{name} > %{version}
|
||||||
%else
|
%else
|
||||||
BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{version})
|
BuildRequires: (%{name} >= %{bootstrap_version} with %{name} <= %{version})
|
||||||
%endif
|
%endif
|
||||||
%global local_rust_root %{_prefix}
|
%global local_rust_root %{_prefix}
|
||||||
%endif
|
%endif
|
||||||
@ -183,7 +199,7 @@ BuildRequires: pkgconfig(openssl)
|
|||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
|
||||||
%if %{without bundled_libgit2}
|
%if %{without bundled_libgit2}
|
||||||
BuildRequires: pkgconfig(libgit2) >= %{min_libgit2_version}
|
BuildRequires: (pkgconfig(libgit2) >= %{min_libgit2_version} with pkgconfig(libgit2) < %{next_libgit2_version})
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{without disabled_libssh2}
|
%if %{without disabled_libssh2}
|
||||||
@ -285,16 +301,21 @@ BuildRequires: %{devtoolset_name}-gcc-c++
|
|||||||
%if %defined mingw_targets
|
%if %defined mingw_targets
|
||||||
BuildRequires: mingw32-filesystem >= 95
|
BuildRequires: mingw32-filesystem >= 95
|
||||||
BuildRequires: mingw64-filesystem >= 95
|
BuildRequires: mingw64-filesystem >= 95
|
||||||
|
BuildRequires: mingw32-crt
|
||||||
|
BuildRequires: mingw64-crt
|
||||||
BuildRequires: mingw32-gcc
|
BuildRequires: mingw32-gcc
|
||||||
BuildRequires: mingw64-gcc
|
BuildRequires: mingw64-gcc
|
||||||
|
BuildRequires: mingw32-winpthreads-static
|
||||||
|
BuildRequires: mingw64-winpthreads-static
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %defined wasm_targets
|
%if %defined wasm_targets
|
||||||
BuildRequires: clang
|
BuildRequires: clang
|
||||||
|
BuildRequires: lld
|
||||||
# brp-strip-static-archive breaks the archive index for wasm
|
# brp-strip-static-archive breaks the archive index for wasm
|
||||||
%global __os_install_post \
|
%global __os_install_post \
|
||||||
%__os_install_post \
|
%__os_install_post \
|
||||||
find '%{buildroot}%{rustlibdir}' -type f -path '*/wasm*/lib/*.rlib' -print -exec '%{llvm_root}/bin/llvm-ranlib' '{}' ';' \
|
find '%{buildroot}%{rustlibdir}'/wasm*/lib -type f -regex '.*\\.\\(a\\|rlib\\)' -print -exec '%{llvm_root}/bin/llvm-ranlib' '{}' ';' \
|
||||||
%{nil}
|
%{nil}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -523,20 +544,26 @@ data to provide information about the Rust standard library.
|
|||||||
%prep
|
%prep
|
||||||
|
|
||||||
%ifarch %{bootstrap_arches}
|
%ifarch %{bootstrap_arches}
|
||||||
%setup -q -n %{bootstrap_root} -T -b %{bootstrap_source}
|
rm -rf %{local_rust_root}
|
||||||
./install.sh --components=cargo,rustc,rust-std-%{rust_triple} \
|
%setup -q -n cargo-%{bootstrap_suffix} -T -b %{bootstrap_source_cargo}
|
||||||
--prefix=%{local_rust_root} --disable-ldconfig
|
./install.sh --prefix=%{local_rust_root} --disable-ldconfig
|
||||||
|
%setup -q -n rustc-%{bootstrap_suffix} -T -b %{bootstrap_source_rustc}
|
||||||
|
./install.sh --prefix=%{local_rust_root} --disable-ldconfig
|
||||||
|
%setup -q -n rust-std-%{bootstrap_suffix} -T -b %{bootstrap_source_std}
|
||||||
|
./install.sh --prefix=%{local_rust_root} --disable-ldconfig
|
||||||
test -f '%{local_rust_root}/bin/cargo'
|
test -f '%{local_rust_root}/bin/cargo'
|
||||||
test -f '%{local_rust_root}/bin/rustc'
|
test -f '%{local_rust_root}/bin/rustc'
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %defined wasm_targets
|
%if %defined wasm_targets
|
||||||
%setup -q -n %{wasi_libc_name} -T -b 1
|
%setup -q -n %{wasi_libc_name} -T -b 1
|
||||||
|
%patch3 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%setup -q -n %{rustc_package}
|
%setup -q -n %{rustc_package}
|
||||||
|
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%if %with disabled_libssh2
|
%if %with disabled_libssh2
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
@ -639,14 +666,6 @@ if [ "$max_cpus" -ge 1 -a "$max_cpus" -lt "$ncpus" ]; then
|
|||||||
ncpus="$max_cpus"
|
ncpus="$max_cpus"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%define target_config %{shrink:
|
|
||||||
--set target.%{rust_triple}.linker=%{__cc}
|
|
||||||
--set target.%{rust_triple}.cc=%{__cc}
|
|
||||||
--set target.%{rust_triple}.cxx=%{__cxx}
|
|
||||||
--set target.%{rust_triple}.ar=%{__ar}
|
|
||||||
--set target.%{rust_triple}.ranlib=%{__ranlib}
|
|
||||||
}
|
|
||||||
|
|
||||||
%if %defined mingw_targets
|
%if %defined mingw_targets
|
||||||
%{lua: do
|
%{lua: do
|
||||||
local cfg = ""
|
local cfg = ""
|
||||||
@ -655,14 +674,15 @@ fi
|
|||||||
triple = triple,
|
triple = triple,
|
||||||
mingw = string.sub(triple, 1, 4) == "i686" and "mingw32" or "mingw64",
|
mingw = string.sub(triple, 1, 4) == "i686" and "mingw32" or "mingw64",
|
||||||
}
|
}
|
||||||
local s = string.gsub([[%{shrink:
|
local s = string.gsub([[
|
||||||
--set target.{{triple}}.linker=%{{{mingw}}_cc}
|
--set target.{{triple}}.linker=%{{{mingw}}_cc}
|
||||||
--set target.{{triple}}.cc=%{{{mingw}}_cc}
|
--set target.{{triple}}.cc=%{{{mingw}}_cc}
|
||||||
--set target.{{triple}}.ar=%{{{mingw}}_ar}
|
--set target.{{triple}}.ar=%{{{mingw}}_ar}
|
||||||
--set target.{{triple}}.ranlib=%{{{mingw}}_ranlib}
|
--set target.{{triple}}.ranlib=%{{{mingw}}_ranlib}
|
||||||
}]], "{{(%w+)}}", subs)
|
]], "{{(%w+)}}", subs)
|
||||||
cfg = cfg .. " " .. s
|
cfg = cfg .. " " .. s
|
||||||
end
|
end
|
||||||
|
cfg = string.gsub(cfg, "%s+", " ")
|
||||||
rpm.define("mingw_target_config " .. cfg)
|
rpm.define("mingw_target_config " .. cfg)
|
||||||
end}
|
end}
|
||||||
%endif
|
%endif
|
||||||
@ -684,11 +704,16 @@ end}
|
|||||||
%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} \
|
||||||
%{target_config} \
|
--set target.%{rust_triple}.linker=%{__cc} \
|
||||||
|
--set target.%{rust_triple}.cc=%{__cc} \
|
||||||
|
--set target.%{rust_triple}.cxx=%{__cxx} \
|
||||||
|
--set target.%{rust_triple}.ar=%{__ar} \
|
||||||
|
--set target.%{rust_triple}.ranlib=%{__ranlib} \
|
||||||
%{?mingw_target_config} \
|
%{?mingw_target_config} \
|
||||||
%{?wasm_target_config} \
|
%{?wasm_target_config} \
|
||||||
--python=%{__python3} \
|
--python=%{__python3} \
|
||||||
--local-rust-root=%{local_rust_root} \
|
--local-rust-root=%{local_rust_root} \
|
||||||
|
--set build.rustfmt=/bin/true \
|
||||||
%{!?with_bundled_llvm: --llvm-root=%{llvm_root} \
|
%{!?with_bundled_llvm: --llvm-root=%{llvm_root} \
|
||||||
%{!?llvm_has_filecheck: --disable-codegen-tests} \
|
%{!?llvm_has_filecheck: --disable-codegen-tests} \
|
||||||
%{!?with_llvm_static: --enable-llvm-link-shared } } \
|
%{!?with_llvm_static: --enable-llvm-link-shared } } \
|
||||||
@ -798,6 +823,13 @@ env RUSTC=%{buildroot}%{_bindir}/rustc \
|
|||||||
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
|
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
|
||||||
%{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml
|
%{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml
|
||||||
|
|
||||||
|
# Try a build sanity-check for other targets
|
||||||
|
for triple in %{?mingw_targets} %{?wasm_targets}; do
|
||||||
|
env RUSTC=%{buildroot}%{_bindir}/rustc \
|
||||||
|
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
|
||||||
|
%{buildroot}%{_bindir}/cargo build --manifest-path build/hello-world/Cargo.toml --target=$triple
|
||||||
|
done
|
||||||
|
|
||||||
# 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.
|
# Some of the larger test artifacts are manually cleaned to save space.
|
||||||
%{__python3} ./x.py test --no-fail-fast --stage 2 || :
|
%{__python3} ./x.py test --no-fail-fast --stage 2 || :
|
||||||
@ -975,6 +1007,12 @@ end}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 20 2022 Josh Stone <jistone@redhat.com> - 1.60.0-1
|
||||||
|
- Update to 1.60.0.
|
||||||
|
|
||||||
|
* Tue Apr 19 2022 Josh Stone <jistone@redhat.com> - 1.59.0-1
|
||||||
|
- Update to 1.59.0.
|
||||||
|
|
||||||
* Thu Jan 20 2022 Josh Stone <jistone@redhat.com> - 1.58.1-1
|
* Thu Jan 20 2022 Josh Stone <jistone@redhat.com> - 1.58.1-1
|
||||||
- Update to 1.58.1.
|
- Update to 1.58.1.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user