Subject: [PATCH rust-team 001/106] gnu: rust-ring-0.14-sources: Patch for >=1.2 cc crate.

From: Herman Rimm <[email-masked]>
Date: Fri, 31 Jan 2025 22:09:22 +0100

* gnu/packages/crates-crypto.scm (rust-ring-0.14-sources): Remove cast
and outdated attributes.

Change-Id: Ibcbea7d442c87803bc10b2391dddd91e5bf33694
---
 gnu/packages/crates-crypto.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/crates-crypto.scm b/gnu/packages/crates-crypto.scm
index 8e2290ca993..7cb44340f65 100644
--- a/gnu/packages/crates-crypto.scm
+++ b/gnu/packages/crates-crypto.scm
@@ -16,7 +16,7 @@
 ;;; Copyright © 2023 Steve George <[email-masked]>
 ;;; Copyright © 2023 VÖRÖSKŐI András <[email-masked]>
 ;;; Copyright © 2024 Wilko Meyer <[email-masked]>
-;;; Copyright © 2024 Herman Rimm <[email-masked]>
+;;; Copyright © 2024, 2025 Herman Rimm <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4545,7 +4545,13 @@ (define rust-ring-0.14-sources
               #~(begin (use-modules (guix build utils))
                        ;; It turns out Guix's yasm works just fine here.
                        (substitute* "build.rs"
-                         (("yasm.exe") "yasm"))
+                         (("yasm.exe") "yasm")
+                         ;; cc >=1.2 does not accept the cast.
+                         (("(\"-Wl,--gc-sections\").into\\(\\)" _ match)
+                          match))
+                       (substitute* '("src/test.rs" "src/rsa/bigint.rs")
+                         ;; Lint `box_pointers` has been removed.
+                         (("#!?\\[allow\\(box_pointers\\)\\]") ""))
                        ;; These files are pregenerated:
                        (delete-file "third_party/fiat/curve25519_tables.h")
                        (delete-file "crypto/fipsmodule/ec/ecp_nistz256_table.inl")
-- 
2.47.1