|
|
@ -1,5 +1,5 @@
|
|
|
|
Name: rust
|
|
|
|
Name: rust
|
|
|
|
Version: 1.76.0
|
|
|
|
Version: 1.75.0
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: The Rust Programming Language
|
|
|
|
Summary: The Rust Programming Language
|
|
|
|
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016)
|
|
|
|
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016)
|
|
|
@ -14,9 +14,9 @@ ExclusiveArch: %{rust_arches}
|
|
|
|
# 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.59.0 wants rustc: 1.58.0-2022-01-13
|
|
|
|
# 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
|
|
|
|
%global bootstrap_version 1.75.0
|
|
|
|
%global bootstrap_version 1.74.0
|
|
|
|
%global bootstrap_channel 1.75.0
|
|
|
|
%global bootstrap_channel 1.74.0
|
|
|
|
%global bootstrap_date 2023-12-28
|
|
|
|
%global bootstrap_date 2023-11-16
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
# NOTE: Those binaries used to be uploaded with every new release, but that was
|
|
|
@ -44,9 +44,10 @@ ExclusiveArch: %{rust_arches}
|
|
|
|
|
|
|
|
|
|
|
|
# We need CRT files for *-wasi targets, at least as new as the commit in
|
|
|
|
# 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
|
|
|
|
# src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh
|
|
|
|
|
|
|
|
# (updated per https://github.com/rust-lang/rust/pull/96907)
|
|
|
|
%global wasi_libc_url https://github.com/WebAssembly/wasi-libc
|
|
|
|
%global wasi_libc_url https://github.com/WebAssembly/wasi-libc
|
|
|
|
#global wasi_libc_ref wasi-sdk-21
|
|
|
|
#global wasi_libc_ref wasi-sdk-20
|
|
|
|
%global wasi_libc_ref 03b228e46bb02fcc5927253e1b8ad715072b1ae4
|
|
|
|
%global wasi_libc_ref bd950eb128bff337153de217b11270f948d04bb4
|
|
|
|
%global wasi_libc_name wasi-libc-%{wasi_libc_ref}
|
|
|
|
%global wasi_libc_name wasi-libc-%{wasi_libc_ref}
|
|
|
|
%global wasi_libc_source %{wasi_libc_url}/archive/%{wasi_libc_ref}/%{wasi_libc_name}.tar.gz
|
|
|
|
%global wasi_libc_source %{wasi_libc_url}/archive/%{wasi_libc_ref}/%{wasi_libc_name}.tar.gz
|
|
|
|
%global wasi_libc_dir %{_builddir}/%{wasi_libc_name}
|
|
|
|
%global wasi_libc_dir %{_builddir}/%{wasi_libc_name}
|
|
|
@ -62,7 +63,7 @@ ExclusiveArch: %{rust_arches}
|
|
|
|
# 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 15.0+.
|
|
|
|
# is insufficient. Rust currently requires LLVM 15.0+.
|
|
|
|
%global min_llvm_version 15.0.0
|
|
|
|
%global min_llvm_version 15.0.0
|
|
|
|
%global bundled_llvm_version 17.0.6
|
|
|
|
%global bundled_llvm_version 17.0.5
|
|
|
|
%bcond_with bundled_llvm
|
|
|
|
%bcond_with bundled_llvm
|
|
|
|
|
|
|
|
|
|
|
|
# Requires stable libgit2 1.7, and not the next minor soname change.
|
|
|
|
# Requires stable libgit2 1.7, and not the next minor soname change.
|
|
|
@ -84,15 +85,9 @@ ExclusiveArch: %{rust_arches}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?__isa_bits} == 32
|
|
|
|
%if 0%{?__isa_bits} == 32
|
|
|
|
# Reduce rustc's own debuginfo and optimizations to conserve 32-bit memory.
|
|
|
|
# Disable PGO on 32-bit to reduce build memory
|
|
|
|
# e.g. https://github.com/rust-lang/rust/issues/45854
|
|
|
|
|
|
|
|
%global enable_debuginfo --debuginfo-level=0 --debuginfo-level-std=2
|
|
|
|
|
|
|
|
%global enable_rust_opts --set rust.codegen-units-std=1
|
|
|
|
|
|
|
|
%bcond_with rustc_pgo
|
|
|
|
%bcond_with rustc_pgo
|
|
|
|
%else
|
|
|
|
%else
|
|
|
|
# Build rustc with full debuginfo, CGU=1, ThinLTO, and PGO.
|
|
|
|
|
|
|
|
%global enable_debuginfo --debuginfo-level=2
|
|
|
|
|
|
|
|
%global enable_rust_opts --set rust.codegen-units=1 --set rust.lto=thin
|
|
|
|
|
|
|
|
%bcond_without rustc_pgo
|
|
|
|
%bcond_without rustc_pgo
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
@ -123,18 +118,16 @@ Patch3: 0001-Let-environment-variables-override-some-default-CPUs.patch
|
|
|
|
Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch
|
|
|
|
Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch
|
|
|
|
Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch
|
|
|
|
Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch
|
|
|
|
|
|
|
|
|
|
|
|
# We don't want to use the bundled library in libsqlite3-sys
|
|
|
|
# https://github.com/rust-lang/rust/pull/117982
|
|
|
|
Patch6: rustc-1.76.0-unbundle-sqlite.patch
|
|
|
|
Patch6: 0001-bootstrap-only-show-PGO-warnings-when-verbose.patch
|
|
|
|
|
|
|
|
|
|
|
|
### RHEL-specific patches below ###
|
|
|
|
### RHEL-specific patches below ###
|
|
|
|
|
|
|
|
|
|
|
|
# Simple rpm macros for rust-toolset (as opposed to full rust-packaging)
|
|
|
|
# Simple rpm macros for rust-toolset (as opposed to full rust-packaging)
|
|
|
|
Source100: macros.rust-toolset
|
|
|
|
Source100: macros.rust-toolset
|
|
|
|
Source101: cargo_vendor.attr
|
|
|
|
|
|
|
|
Source102: cargo_vendor.prov
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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.76.0-disable-libssh2.patch
|
|
|
|
Patch100: rustc-1.75.0-disable-libssh2.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)
|
|
|
@ -204,7 +197,6 @@ BuildRequires: curl-devel
|
|
|
|
BuildRequires: pkgconfig(libcurl)
|
|
|
|
BuildRequires: pkgconfig(libcurl)
|
|
|
|
BuildRequires: pkgconfig(liblzma)
|
|
|
|
BuildRequires: pkgconfig(liblzma)
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: pkgconfig(sqlite3)
|
|
|
|
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
|
|
|
|
|
|
|
|
%if %{without bundled_libgit2}
|
|
|
|
%if %{without bundled_libgit2}
|
|
|
@ -594,7 +586,6 @@ mkdir -p src/llvm-project/libunwind/
|
|
|
|
%clear_dir vendor/*jemalloc-sys*/jemalloc/
|
|
|
|
%clear_dir vendor/*jemalloc-sys*/jemalloc/
|
|
|
|
%clear_dir vendor/libffi-sys*/libffi/
|
|
|
|
%clear_dir vendor/libffi-sys*/libffi/
|
|
|
|
%clear_dir vendor/libmimalloc-sys*/c_src/mimalloc/
|
|
|
|
%clear_dir vendor/libmimalloc-sys*/c_src/mimalloc/
|
|
|
|
%clear_dir vendor/libsqlite3-sys*/{sqlite3,sqlcipher}/
|
|
|
|
|
|
|
|
%clear_dir vendor/libssh2-sys*/libssh2/
|
|
|
|
%clear_dir vendor/libssh2-sys*/libssh2/
|
|
|
|
%clear_dir vendor/libz-sys*/src/zlib{,-ng}/
|
|
|
|
%clear_dir vendor/libz-sys*/src/zlib{,-ng}/
|
|
|
|
%clear_dir vendor/lzma-sys*/xz-*/
|
|
|
|
%clear_dir vendor/lzma-sys*/xz-*/
|
|
|
@ -647,19 +638,27 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
|
|
|
|
print(env)
|
|
|
|
print(env)
|
|
|
|
end}
|
|
|
|
end}
|
|
|
|
|
|
|
|
|
|
|
|
# Set up shared environment variables for build/install/check.
|
|
|
|
# Set up shared environment variables for build/install/check
|
|
|
|
# *_USE_PKG_CONFIG=1 convinces *-sys crates to use the system library.
|
|
|
|
%global rust_env %{?rustflags:RUSTFLAGS="%{rustflags}"} %{rustc_target_cpus}
|
|
|
|
%global rust_env %{shrink:
|
|
|
|
%if %without disabled_libssh2
|
|
|
|
%{?rustflags:RUSTFLAGS="%{rustflags}"}
|
|
|
|
# convince libssh2-sys to use the distro libssh2
|
|
|
|
%{rustc_target_cpus}
|
|
|
|
%global rust_env %{?rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1
|
|
|
|
LIBSQLITE3_SYS_USE_PKG_CONFIG=1
|
|
|
|
%endif
|
|
|
|
%{!?with_disabled_libssh2:LIBSSH2_SYS_USE_PKG_CONFIG=1}
|
|
|
|
%global export_rust_env %{?rust_env:export %{rust_env}}
|
|
|
|
}
|
|
|
|
|
|
|
|
%global export_rust_env export %{rust_env}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
%{export_rust_env}
|
|
|
|
%{export_rust_env}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ifarch %{arm} %{ix86}
|
|
|
|
|
|
|
|
# full debuginfo and compiler opts are exhausting memory; just do libstd for now
|
|
|
|
|
|
|
|
# https://github.com/rust-lang/rust/issues/45854
|
|
|
|
|
|
|
|
%define enable_debuginfo --debuginfo-level=0 --debuginfo-level-std=2
|
|
|
|
|
|
|
|
%define enable_rust_opts --set rust.codegen-units-std=1
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%define enable_debuginfo --debuginfo-level=2
|
|
|
|
|
|
|
|
%define enable_rust_opts --set rust.codegen-units=1 --set rust.lto=thin
|
|
|
|
|
|
|
|
%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)
|
|
|
@ -850,8 +849,6 @@ rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
|
|
|
|
%if 0%{?rhel}
|
|
|
|
%if 0%{?rhel}
|
|
|
|
# This allows users to build packages using Rust Toolset.
|
|
|
|
# This allows users to build packages using Rust Toolset.
|
|
|
|
%{__install} -D -m 644 %{S:100} %{buildroot}%{rpmmacrodir}/macros.rust-toolset
|
|
|
|
%{__install} -D -m 644 %{S:100} %{buildroot}%{rpmmacrodir}/macros.rust-toolset
|
|
|
|
%{__install} -D -m 644 %{S:101} %{buildroot}%{_fileattrsdir}/cargo_vendor.attr
|
|
|
|
|
|
|
|
%{__install} -D -m 755 %{S:102} %{buildroot}%{_rpmconfigdir}/cargo_vendor.prov
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1033,16 +1030,10 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
|
|
|
|
%if 0%{?rhel}
|
|
|
|
%if 0%{?rhel}
|
|
|
|
%files toolset
|
|
|
|
%files toolset
|
|
|
|
%{rpmmacrodir}/macros.rust-toolset
|
|
|
|
%{rpmmacrodir}/macros.rust-toolset
|
|
|
|
%{_fileattrsdir}/cargo_vendor.attr
|
|
|
|
|
|
|
|
%{_rpmconfigdir}/cargo_vendor.prov
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Tue Apr 16 2024 Josh Stone <jistone@redhat.com> - 1.76.0-1
|
|
|
|
|
|
|
|
- Update to 1.76.0.
|
|
|
|
|
|
|
|
- Sync rust-toolset macros to rust-packaging v25.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jan 05 2024 Josh Stone <jistone@redhat.com> - 1.75.0-1
|
|
|
|
* Fri Jan 05 2024 Josh Stone <jistone@redhat.com> - 1.75.0-1
|
|
|
|
- Update to 1.75.0.
|
|
|
|
- Update to 1.75.0.
|
|
|
|
|
|
|
|
|
|
|
|