The package rpms/rust.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/rust.git/commit/?id=6b5e21282d88f288....
Change: +%ifarch riscv64
Thanks.
Full change: ============
commit 15b7bb28e4ba39b27852fa053dd3a3f90003e9a4 Author: Nikita Popov npopov@redhat.com Date: Wed Mar 6 17:56:41 2024 +0100
Add LLVM 18 compat patches
diff --git a/120529.patch b/120529.patch new file mode 100644 index 0000000..9e53295 --- /dev/null +++ b/120529.patch @@ -0,0 +1,62 @@ +From 8eb48b4f4c6e3d48f2600159a75184ec4d74b249 Mon Sep 17 00:00:00 2001 +From: Nikita Popov npopov@redhat.com +Date: Wed, 31 Jan 2024 15:08:08 +0100 +Subject: [PATCH] Update data layouts in custom target tests for LLVM 18 + +Fixes https://github.com/rust-lang/rust/issues/120492. +--- + tests/run-make/rust-lld-custom-target/custom-target.json | 2 +- + tests/run-make/rustdoc-target-spec-json-path/target.json | 2 +- + tests/run-make/target-specs/my-awesome-platform.json | 2 +- + .../target-specs/my-x86_64-unknown-linux-gnu-platform.json | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tests/run-make/rust-lld-custom-target/custom-target.json b/tests/run-make/rust-lld-custom-target/custom-target.json +index 7828a99f235c1..e2c64cbdb43c2 100644 +--- a/tests/run-make/rust-lld-custom-target/custom-target.json ++++ b/tests/run-make/rust-lld-custom-target/custom-target.json +@@ -2,7 +2,7 @@ + "arch": "x86_64", + "cpu": "x86-64", + "crt-static-respected": true, +- "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", ++ "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", + "dynamic-linking": true, + "env": "gnu", + "has-rpath": true, +diff --git a/tests/run-make/rustdoc-target-spec-json-path/target.json b/tests/run-make/rustdoc-target-spec-json-path/target.json +index 34357182c205e..c478f1196fae0 100644 +--- a/tests/run-make/rustdoc-target-spec-json-path/target.json ++++ b/tests/run-make/rustdoc-target-spec-json-path/target.json +@@ -2,7 +2,7 @@ + "arch": "x86_64", + "cpu": "x86-64", + "crt-static-respected": true, +- "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", ++ "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", + "dynamic-linking": true, + "env": "gnu", + "executables": true, +diff --git a/tests/run-make/target-specs/my-awesome-platform.json b/tests/run-make/target-specs/my-awesome-platform.json +index 00de3de05f07a..1673ef7bd54d1 100644 +--- a/tests/run-make/target-specs/my-awesome-platform.json ++++ b/tests/run-make/target-specs/my-awesome-platform.json +@@ -1,5 +1,5 @@ + { +- "data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128", ++ "data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128", + "linker-flavor": "gcc", + "llvm-target": "i686-unknown-linux-gnu", + "target-endian": "little", +diff --git a/tests/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json b/tests/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json +index 6d5e964ed4fee..0cafce15a9fef 100644 +--- a/tests/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json ++++ b/tests/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json +@@ -1,6 +1,6 @@ + { + "pre-link-args": {"gcc": ["-m64"]}, +- "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", ++ "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", + "linker-flavor": "gcc", + "llvm-target": "x86_64-unknown-linux-gnu", + "target-endian": "little", diff --git a/121088.patch b/121088.patch new file mode 100644 index 0000000..b70b52a --- /dev/null +++ b/121088.patch @@ -0,0 +1,55 @@ +From 369fff6c0640fe89be9b915adaa83e66a022e00d Mon Sep 17 00:00:00 2001 +From: Nikita Popov npopov@redhat.com +Date: Wed, 14 Feb 2024 16:26:20 +0100 +Subject: [PATCH] Implicitly enable evex512 if avx512 is enabled + +LLVM 18 requires the evex512 feature to allow use of zmm registers. +LLVM automatically sets it when using a generic CPU, but not when +`-C target-cpu` is specified. This will result either in backend +legalization crashes, or code unexpectedly using ymm instead of +zmm registers. + +For now, make sure that `avx512*` features imply `evex512`. Long +term we'll probably have to deal with the AVX10 mess somehow. +--- + compiler/rustc_codegen_llvm/src/llvm_util.rs | 4 ++++ + tests/ui/asm/x86_64/evex512-implicit-feature.rs | 15 +++++++++++++++ + 2 files changed, 19 insertions(+) + create mode 100644 tests/ui/asm/x86_64/evex512-implicit-feature.rs + +diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs +index e48479c8da279..54e8ed85e3250 100644 +--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs ++++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs +@@ -266,6 +266,10 @@ pub fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> LLVMFeature<'a> { + ("riscv32" | "riscv64", "fast-unaligned-access") if get_version().0 <= 17 => { + LLVMFeature::new("unaligned-scalar-mem") + } ++ // For LLVM 18, enable the evex512 target feature if a avx512 target feature is enabled. ++ ("x86", s) if get_version().0 >= 18 && s.starts_with("avx512") => { ++ LLVMFeature::with_dependency(s, TargetFeatureFoldStrength::EnableOnly("evex512")) ++ } + (_, s) => LLVMFeature::new(s), + } + } +diff --git a/tests/ui/asm/x86_64/evex512-implicit-feature.rs b/tests/ui/asm/x86_64/evex512-implicit-feature.rs +new file mode 100644 +index 0000000000000..a15060857eccb +--- /dev/null ++++ b/tests/ui/asm/x86_64/evex512-implicit-feature.rs +@@ -0,0 +1,15 @@ ++// build-pass ++// only-x86_64 ++// compile-flags: --crate-type=lib -C target-cpu=skylake ++ ++#![feature(avx512_target_feature)] ++#![feature(stdarch_x86_avx512)] ++ ++use std::arch::x86_64::*; ++ ++#[target_feature(enable = "avx512f")] ++#[no_mangle] ++pub unsafe fn test(res: *mut f64, p: *const f64) { ++ let arg = _mm512_load_pd(p); ++ _mm512_store_pd(res, _mm512_fmaddsub_pd(arg, arg, arg)); ++} diff --git a/rust.spec b/rust.spec index 3cddd3a..776d5ef 100644 --- a/rust.spec +++ b/rust.spec @@ -137,6 +137,10 @@ Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch # We don't want to use the bundled library in libsqlite3-sys Patch6: rustc-1.77.0-unbundle-sqlite.patch
+# Backports of fixes for LLVM 18 compatibility +Patch7: 120529.patch +Patch8: 121088.patch + ### RHEL-specific patches below ###
# Simple rpm macros for rust-toolset (as opposed to full rust-packaging) @@ -591,6 +595,9 @@ rm -rf %{wasi_libc_dir}/dlmalloc/ %endif %patch -P6 -p1
+%patch -P7 -p1 +%patch -P8 -p1 + %if %with disabled_libssh2 %patch -P100 -p1 %endif
commit 504e9e1d44f44932a24e3047652e054845ec8d18 Author: Nikita Popov npopov@redhat.com Date: Wed Feb 14 12:31:06 2024 +0100
Update to 1.77.0
diff --git a/.gitignore b/.gitignore index 85da98e..8c04a16 100644 --- a/.gitignore +++ b/.gitignore @@ -432,3 +432,4 @@ /rustc-1.75.0-src.tar.xz /rustc-1.76.0-src.tar.xz /wasi-libc-03b228e46bb02fcc5927253e1b8ad715072b1ae4.tar.gz +/rustc-1.77.0-src.tar.xz diff --git a/rust.spec b/rust.spec index bb3b19c..3cddd3a 100644 --- a/rust.spec +++ b/rust.spec @@ -1,5 +1,5 @@ Name: rust -Version: 1.76.0 +Version: 1.77.0 Release: 1%{?dist} 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) @@ -14,9 +14,9 @@ ExclusiveArch: %{rust_arches} # 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 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_version 1.75.0 -%global bootstrap_channel 1.75.0 -%global bootstrap_date 2023-12-28 +%global bootstrap_version 1.76.0 +%global bootstrap_channel 1.76.0 +%global bootstrap_date 2024-02-08
# Only the specified arches will use bootstrap binaries. # NOTE: Those binaries used to be uploaded with every new release, but that was @@ -67,9 +67,9 @@ ExclusiveArch: %{rust_arches}
# Requires stable libgit2 1.7, and not the next minor soname change. # This needs to be consistent with the bindings in vendor/libgit2-sys. -%global min_libgit2_version 1.7.1 +%global min_libgit2_version 1.7.2 %global next_libgit2_version 1.8.0~ -%global bundled_libgit2_version 1.7.1 +%global bundled_libgit2_version 1.7.2 %if 0%{?fedora} >= 39 %bcond_with bundled_libgit2 %else @@ -135,7 +135,7 @@ Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch
# We don't want to use the bundled library in libsqlite3-sys -Patch6: rustc-1.76.0-unbundle-sqlite.patch +Patch6: rustc-1.77.0-unbundle-sqlite.patch
### RHEL-specific patches below ###
@@ -146,7 +146,7 @@ Source102: cargo_vendor.attr Source103: cargo_vendor.prov
# 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.77.0-disable-libssh2.patch
# Get the Rust triple for any arch. %{lua: function rust_triple(arch) @@ -749,6 +749,7 @@ test -r "%{profiler}" --set build.doc-stage=2 \ --set build.install-stage=2 \ --set build.test-stage=2 \ + --set build.optimized-compiler-builtins=false \ --enable-extended \ --tools=cargo,clippy,rls,rust-analyzer,rustfmt,src \ --enable-vendor \ @@ -1063,6 +1064,9 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
%changelog +* Thu Mar 21 2024 Nikita Popov npopov@redhat.com - 1.77.0-1 +- Update to 1.77.0 + * Thu Feb 08 2024 Josh Stone jistone@redhat.com - 1.76.0-1 - Update to 1.76.0.
diff --git a/rustc-1.76.0-disable-libssh2.patch b/rustc-1.76.0-disable-libssh2.patch deleted file mode 100644 index 2c6fba2..0000000 --- a/rustc-1.76.0-disable-libssh2.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-01-07 18:12:08.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-01-09 15:25:51.519781381 -0800 -@@ -2071,7 +2071,6 @@ - dependencies = [ - "cc", - "libc", -- "libssh2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", -@@ -2113,20 +2112,6 @@ - "pkg-config", - "vcpkg", - ] -- --[[package]] --name = "libssh2-sys" --version = "0.3.0" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" --dependencies = [ -- "cc", -- "libc", -- "libz-sys", -- "openssl-sys", -- "pkg-config", -- "vcpkg", --] - - [[package]] - name = "libz-sys" ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-01-09 15:23:02.369032291 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-01-09 15:24:44.015679666 -0800 -@@ -40,7 +40,7 @@ - curl-sys = "0.4.70" - filetime = "0.2.22" - flate2 = { version = "1.0.28", default-features = false, features = ["zlib"] } --git2 = "0.18.1" -+git2 = { version = "0.18.1", default-features = false, features = ["https"] } - git2-curl = "0.19.0" - gix = { version = "0.56.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] } - gix-features-for-configuration-only = { version = "0.35.0", package = "gix-features", features = [ "parallel" ] } diff --git a/rustc-1.76.0-unbundle-sqlite.patch b/rustc-1.76.0-unbundle-sqlite.patch deleted file mode 100644 index 6c1c667..0000000 --- a/rustc-1.76.0-unbundle-sqlite.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-01-07 18:12:08.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-01-09 15:36:23.808367445 -0800 -@@ -2109,7 +2109,6 @@ - source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" - dependencies = [ -- "cc", - "pkg-config", - "vcpkg", - ] ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-01-07 18:12:08.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-01-09 15:36:18.534437627 -0800 -@@ -73,7 +73,7 @@ - pulldown-cmark = { version = "0.9.3", default-features = false } - rand = "0.8.5" - regex = "1.10.2" --rusqlite = { version = "0.30.0", features = ["bundled"] } -+rusqlite = { version = "0.30.0", features = [] } - rustfix = { version = "0.7.0", path = "crates/rustfix" } - same-file = "1.0.6" - security-framework = "2.9.2" diff --git a/rustc-1.77.0-disable-libssh2.patch b/rustc-1.77.0-disable-libssh2.patch new file mode 100644 index 0000000..859fecb --- /dev/null +++ b/rustc-1.77.0-disable-libssh2.patch @@ -0,0 +1,44 @@ +diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock +--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-02-14 14:06:05.881165093 +0100 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-02-14 14:06:27.169456166 +0100 +@@ -2072,7 +2072,6 @@ checksum = "ee4126d8b4ee5c9d9ea891dd875c + dependencies = [ + "cc", + "libc", +- "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +@@ -2113,20 +2112,6 @@ dependencies = [ + "pkg-config", + "vcpkg", + ] +- +-[[package]] +-name = "libssh2-sys" +-version = "0.3.0" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" +-dependencies = [ +- "cc", +- "libc", +- "libz-sys", +- "openssl-sys", +- "pkg-config", +- "vcpkg", +-] + + [[package]] + name = "libz-sys" +diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-02-14 14:06:10.400226884 +0100 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-02-14 14:06:51.225785086 +0100 +@@ -44,7 +44,7 @@ curl = "0.4.44" + curl-sys = "0.4.70" + filetime = "0.2.23" + flate2 = { version = "1.0.28", default-features = false, features = ["zlib"] } +-git2 = "0.18.2" ++git2 = { version = "0.18.2", default-features = false, features = ["https"] } + git2-curl = "0.19.0" + gix = { version = "0.57.1", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] } + gix-features-for-configuration-only = { version = "0.37.1", package = "gix-features", features = [ "parallel" ] } diff --git a/rustc-1.77.0-unbundle-sqlite.patch b/rustc-1.77.0-unbundle-sqlite.patch new file mode 100644 index 0000000..50aa4a8 --- /dev/null +++ b/rustc-1.77.0-unbundle-sqlite.patch @@ -0,0 +1,23 @@ +diff -up rustc-beta-src/src/tools/cargo/Cargo.lock.orig rustc-beta-src/src/tools/cargo/Cargo.lock +--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-02-14 13:00:20.318976752 +0100 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-02-14 13:00:28.447051475 +0100 +@@ -2110,7 +2110,6 @@ version = "0.27.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" + dependencies = [ +- "cc", + "pkg-config", + "vcpkg", + ] +diff -up rustc-beta-src/src/tools/cargo/Cargo.toml.orig rustc-beta-src/src/tools/cargo/Cargo.toml +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-02-14 13:00:14.942927327 +0100 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-02-14 13:00:40.688164017 +0100 +@@ -77,7 +77,7 @@ proptest = "1.4.0" + pulldown-cmark = { version = "0.9.3", default-features = false } + rand = "0.8.5" + regex = "1.10.2" +-rusqlite = { version = "0.30.0", features = ["bundled"] } ++rusqlite = { version = "0.30.0", features = [] } + rustfix = { version = "0.8.0", path = "crates/rustfix" } + same-file = "1.0.6" + security-framework = "2.9.2" diff --git a/sources b/sources index e29d03b..e9e2382 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.76.0-src.tar.xz) = 92e16cfdeb91bde341fe6c2774d92868275b07aa1d46d870ddc9291eadfe4ea9af93e06586fa7d6b8d60534903945cbbe706d354c90272712989c58d2bf174bf +SHA512 (rustc-1.77.0-src.tar.xz) = 59f19d9def93b613ac72925625e6662622f445506489b8f1cd405d037c28becd53ae1446b46edfd63734f6f236af2dc326a57a184f01bc10d497c96227f09034 SHA512 (wasi-libc-03b228e46bb02fcc5927253e1b8ad715072b1ae4.tar.gz) = 56306817a6d683aeaf61c3376700804f143b9be101729693c1c88666ea201f02a3e7a3b32150f688a784ac4aae30e46bdbe3fc79a1a9c62e7b460d11ad509045
commit 6b5e21282d88f288cd271233332b37cb2affabd0 Author: David Abdurachmanov davidlt@rivosinc.com Date: Wed Nov 8 14:19:52 2023 +0200
Lower memory usage for riscv64
Signed-off-by: David Abdurachmanov davidlt@rivosinc.com Signed-off-by: Richard W.M. Jones rjones@redhat.com
diff --git a/rust.spec b/rust.spec index 4c4600c..bb3b19c 100644 --- a/rust.spec +++ b/rust.spec @@ -83,9 +83,20 @@ ExclusiveArch: %{rust_arches} %bcond_with disabled_libssh2 %endif
-%if 0%{?__isa_bits} == 32 # Reduce rustc's own debuginfo and optimizations to conserve 32-bit memory. # e.g. https://github.com/rust-lang/rust/issues/45854 +%global reduced_debuginfo 0 +%if 0%{?__isa_bits} == 32 +%global reduced_debuginfo 1 +%endif +# Also on current riscv64 hardware, although future hardware will be +# able to handle it. +# e.g. http://fedora.riscv.rocks/koji/buildinfo?buildID=249870 +%ifarch riscv64 +%global reduced_debuginfo 1 +%endif + +%if 0%{?reduced_debuginfo} %global enable_debuginfo --debuginfo-level=0 --debuginfo-level-std=2 %global enable_rust_opts --set rust.codegen-units-std=1 %bcond_with rustc_pgo
arch-excludes@lists.fedoraproject.org