[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
423/424: gnu: rust: Update to 1.82.
From: |
guix-commits |
Subject: |
423/424: gnu: rust: Update to 1.82. |
Date: |
Sun, 10 Nov 2024 05:43:02 -0500 (EST) |
efraim pushed a commit to branch rust-team
in repository guix.
commit 1cc7473c8298a265c255eeb781c9ef9c5d61c435
Author: Brennan Vincent <brennan@umanwizard.com>
AuthorDate: Fri Oct 18 11:10:20 2024 -0400
gnu: rust: Update to 1.82.
gnu/packages/rust.scm (rust-1.81)[source]: Add patch to fix bootstrap of
1.82 on riscv64.
gnu/packages/rust.scm (rust-1.82): New variable.
gnu/packages/rust.scm (rust): Update to 1.82.
[source]: Update snippet for newer version.
[arguments]: Disable more tests in the 'disable-tests-requiring-crates.io
phase.
Change-Id: If6ff59011edca7a230946a3ba77b51f26cd47789
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
gnu/local.mk | 1 +
.../patches/rust-1.81-fix-riscv64-bootstrap.patch | 40 ++++++++++
gnu/packages/rust.scm | 93 ++++++++++++++++++----
3 files changed, 118 insertions(+), 16 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index a998d555bb..7f9645bcb4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2131,6 +2131,7 @@ dist_patch_DATA =
\
%D%/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch \
%D%/packages/patches/rust-1.70-fix-rustix-build.patch \
%D%/packages/patches/rust-1.78-unwinding-fix.patch \
+ %D%/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch \
%D%/packages/patches/rust-cargo-edit-remove-ureq.patch \
%D%/packages/patches/rust-ring-0.17-ring-core.patch \
%D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
diff --git a/gnu/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch
b/gnu/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch
new file mode 100644
index 0000000000..39a79a9628
--- /dev/null
+++ b/gnu/packages/patches/rust-1.81-fix-riscv64-bootstrap.patch
@@ -0,0 +1,40 @@
+From 99e6a28804eac57faa37134d61a2bb17069996a2 Mon Sep 17 00:00:00 2001
+From: Nicholas Bishop <nicholasbishop@google.com>
+Date: Thu, 30 May 2024 18:32:46 -0400
+Subject: [PATCH] Add f16/f128 handling in a couple places
+
+---
+ compiler/rustc_codegen_llvm/src/abi.rs | 2 ++
+ compiler/rustc_target/src/abi/call/mod.rs | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/compiler/rustc_codegen_llvm/src/abi.rs
b/compiler/rustc_codegen_llvm/src/abi.rs
+index a6a3f0f964611..2e52d3f426a83 100644
+--- a/compiler/rustc_codegen_llvm/src/abi.rs
++++ b/compiler/rustc_codegen_llvm/src/abi.rs
+@@ -121,8 +121,10 @@ impl LlvmType for Reg {
+ match self.kind {
+ RegKind::Integer => cx.type_ix(self.size.bits()),
+ RegKind::Float => match self.size.bits() {
++ 16 => cx.type_f16(),
+ 32 => cx.type_f32(),
+ 64 => cx.type_f64(),
++ 128 => cx.type_f128(),
+ _ => bug!("unsupported float: {:?}", self),
+ },
+ RegKind::Vector => cx.type_vector(cx.type_i8(),
self.size.bytes()),
+diff --git a/compiler/rustc_target/src/abi/call/mod.rs
b/compiler/rustc_target/src/abi/call/mod.rs
+index fc79c9232d1bd..f83d0492004a2 100644
+--- a/compiler/rustc_target/src/abi/call/mod.rs
++++ b/compiler/rustc_target/src/abi/call/mod.rs
+@@ -236,8 +236,10 @@ impl Reg {
+ _ => panic!("unsupported integer: {self:?}"),
+ },
+ RegKind::Float => match self.size.bits() {
++ 16 => dl.f16_align.abi,
+ 32 => dl.f32_align.abi,
+ 64 => dl.f64_align.abi,
++ 128 => dl.f128_align.abi,
+ _ => panic!("unsupported float: {self:?}"),
+ },
+ RegKind::Vector => dl.vector_align(self.size).abi,
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 7f85402242..e6efd094e9 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1051,8 +1051,45 @@ safety and thread safety guarantees.")
(string-append all ", \"use-libc\""))))))))))
(define-public rust-1.81
- (rust-bootstrapped-package rust-1.80 "1.81.0"
- "19yggj1qivdhf68gx2652cfi7nxjkdgy39wh7h6facpzppz4h947"))
+ (let ((base-rust (rust-bootstrapped-package rust-1.80 "1.81.0"
+ "19yggj1qivdhf68gx2652cfi7nxjkdgy39wh7h6facpzppz4h947")))
+ (package
+ (inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ ;; see
https://github.com/rust-lang/rust/issues/129268#issuecomment-2430133779
+ (patches (search-patches
"rust-1.81-fix-riscv64-bootstrap.patch")))))))
+
+(define-public rust-1.82
+ (let ((base-rust (rust-bootstrapped-package rust-1.81 "1.82.0"
+ "0ajiryki2aqsg3ydx3nfhrb5i1mmxvasfszs9qblw66skr8g8lvw")))
+ (package
+ (inherit base-rust)
+ (source
+ (origin
+ (inherit (package-source base-rust))
+ (patches '())))
+ (arguments
+ (substitute-keyword-arguments (package-arguments base-rust)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'patch-cargo-checksums
+ (lambda _
+ (substitute* (cons* "Cargo.lock"
+ "src/bootstrap/Cargo.lock"
+ "library/Cargo.lock"
+ (filter
+ ;; Don't mess with the lock files in the
+ ;; Cargo testsuite; it messes up the
tests.
+ (lambda (path)
+ (not (string-contains
+ path "cargo/tests/testsuite")))
+ (find-files "src/tools" "Cargo.lock")))
+ (("(checksum = )\".*\"" all name)
+ (string-append name "\"" ,%cargo-reference-hash "\"")))
+ (generate-all-checksums "vendor"))))))))))
+
(define (make-ignore-test-list strs)
"Function to make creating a list to ignore tests a bit easier."
@@ -1068,7 +1105,7 @@ safety and thread safety guarantees.")
;;; Here we take the latest included Rust, make it public, and re-enable tests
;;; and extra components such as rustfmt.
(define-public rust
- (let ((base-rust rust-1.81))
+ (let ((base-rust rust-1.82))
(package
(inherit base-rust)
(properties (append
@@ -1082,32 +1119,50 @@ safety and thread safety guarantees.")
'(begin
(for-each delete-file-recursively
'("src/llvm-project"
+ "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
"vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
+ "vendor/openssl-src-111.17.0+1.1.1m/openssl"
"vendor/openssl-src-111.28.2+1.1.1w/openssl"
"vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
;; These are referenced by the cargo output
;; so we unbundle them.
- "vendor/curl-sys-0.4.72+curl-8.6.0/curl"
+ "vendor/curl-sys-0.4.52+curl-7.81.0/curl"
+ "vendor/curl-sys-0.4.74+curl-8.9.0/curl"
"vendor/libffi-sys-2.3.0/libffi"
- "vendor/libnghttp2-sys-0.1.9+1.58.0/nghttp2"
- "vendor/libz-sys-1.1.16/src/zlib"))
+ "vendor/libz-sys-1.1.3/src/zlib"
+ "vendor/libz-sys-1.1.18/src/zlib"
+ "vendor/libz-sys-1.1.19/src/zlib"))
;; Use the packaged nghttp2
- (delete-file "vendor/libnghttp2-sys-0.1.9+1.58.0/build.rs")
- (with-output-to-file "vendor/libnghttp2-sys-0.1.9+1.58.0/build.rs"
- (lambda _
- (format #t "fn main() {~@
+ (for-each
+ (lambda (ver)
+ (let ((vendored-dir (format #f
"vendor/libnghttp2-sys-~a/nghttp2" ver))
+ (build-rs (format #f "vendor/libnghttp2-sys-~a/build.rs"
ver)))
+ (delete-file-recursively vendored-dir)
+ (delete-file build-rs)
+ (with-output-to-file build-rs
+ (lambda _
+ (format #t "fn main() {~@
println!(\"cargo:rustc-link-lib=nghttp2\");~@
- }~%")))
+ }~%")))))
+ '("0.1.10+1.61.0"
+ "0.1.7+1.45.0"))
;; Remove vendored dynamically linked libraries.
;; find . -not -type d -executable -exec file {} \+ | grep ELF
;; Also remove the bundled (mostly Windows) libraries.
(for-each delete-file
(find-files "vendor" "\\.(a|dll|exe|lib)$"))
;; Adjust vendored dependency to explicitly use rustix with libc
backend.
- (substitute* '("vendor/tempfile-3.7.1/Cargo.toml"
- "vendor/tempfile-3.10.1/Cargo.toml")
- (("features = \\[\"fs\"" all)
- (string-append all ", \"use-libc\"")))))))
+ (for-each
+ (lambda (ver)
+ (let ((f (format #f "vendor/tempfile-~a/Cargo.toml" ver)))
+ (substitute* f
+ (("features = \\[\"fs\"" all)
+ (string-append all ", \"use-libc\"")))))
+ '("3.3.0"
+ "3.4.0"
+ "3.7.1"
+ "3.10.1"
+ "3.12.0"))))))
(arguments
(substitute-keyword-arguments
(strip-keyword-arguments '(#:tests?)
@@ -1217,7 +1272,13 @@ safety and thread safety guarantees.")
(lambda _
(substitute* "src/tools/cargo/tests/testsuite/install.rs"
,@(make-ignore-test-list
- '("fn install_global_cargo_config")))))
+ '("fn install_global_cargo_config")))
+ (substitute*
"src/tools/cargo/tests/testsuite/cargo_info/within_ws_with_alternative_registry/mod.rs"
+ ,@(make-ignore-test-list
+ '("fn case")))
+ (substitute* "src/tools/cargo/tests/testsuite/package.rs"
+ ,@(make-ignore-test-list
+ '("fn workspace_with_local_deps_index_mismatch")))))
(add-after 'unpack 'disable-miscellaneous-broken-tests
(lambda _
(substitute* "src/tools/cargo/tests/testsuite/check_cfg.rs"
- 357/424: gnu: Add rust-tui-react-0.23., (continued)
- 357/424: gnu: Add rust-tui-react-0.23., guix-commits, 2024/11/10
- 362/424: gnu: Add rust-object-pool-0.5., guix-commits, 2024/11/10
- 373/424: gnu: Add rust-zlib-rs-0.3., guix-commits, 2024/11/10
- 383/424: gnu: stgit-2: Update to 2.4.12., guix-commits, 2024/11/10
- 391/424: gnu: Add rust-libusb1-sys-0.7., guix-commits, 2024/11/10
- 402/424: gnu: Add rust-windows-interface-0.57., guix-commits, 2024/11/10
- 403/424: gnu: Add rust-windows-implement-0.57., guix-commits, 2024/11/10
- 416/424: gnu: complgen: Don't install the sources., guix-commits, 2024/11/10
- 420/424: gnu: librsvg: Update to 2.58.5., guix-commits, 2024/11/10
- 413/424: gnu: dav1d: Update to 1.5.0., guix-commits, 2024/11/10
- 423/424: gnu: rust: Update to 1.82.,
guix-commits <=
- 74/424: gnu: rust-tokio-1: Update to 1.40.0., guix-commits, 2024/11/10
- 51/424: gnu: rust-serde-derive-1: Update to 1.0.210., guix-commits, 2024/11/10
- 96/424: gnu: rust-parking-lot-0.12: Update to 0.12.3., guix-commits, 2024/11/10
- 98/424: gnu: Add rust-raw-cpuid-11., guix-commits, 2024/11/10
- 105/424: gnu: newsboat: Update to 2.36., guix-commits, 2024/11/10
- 124/424: gnu: rust-serde-json-1: Update to 1.0.128., guix-commits, 2024/11/10
- 127/424: gnu: rust-spin-0.7: Correct inputs., guix-commits, 2024/11/10
- 270/424: gnu: rust-brotli-3: Update to 3.5.0., guix-commits, 2024/11/10
- 286/424: gnu: Add rust-tabled-derive-0.7., guix-commits, 2024/11/10
- 291/424: gnu: rust-tabwriter-1: Update to 1.4.0., guix-commits, 2024/11/10