GNU bug report logs - #72553
[PATCH rust-team 0/4] Several patches removed from core-updates

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sat, 10 Aug 2024 07:11:01 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christopher Baines <mail <at> cbaines.net>
To: 72553 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [bug#72553] [PATCH 2/4] gnu: rust: Fix building.
Date: Sat, 10 Aug 2024 08:11:45 +0100
From: Efraim Flashner <efraim <at> flashner.co.il>

* gnu/packages/rust.scm (rust)[arguments]: Adjust 'unpack-compiler-rt
phase to correctly copy the sources into the target directory.  Adjust
'enable-profiling phase to come after an existing phase.
[native-inputs]: Add clang-runtime-source.

Change-Id: I2e05fa86c4eaf8c2f5f3562d9f7939cd881cde3f
---
 gnu/packages/rust.scm | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 4a3ad99e88..fe503b0d5f 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1223,13 +1223,14 @@ (define-public rust
                                      out "/lib\");\n"))))))
              (add-after 'unpack 'unpack-profiler-rt
                ;; Copy compiler-rt sources to where libprofiler_builtins looks
-               ;; for its vendored copy.  Keep the clang-runtime version in
-               ;; sync with the LLVM version used to build Rust.
+               ;; for its vendored copy.
                (lambda* (#:key inputs #:allow-other-keys)
                  (mkdir-p "src/llvm-project/compiler-rt")
-                 (invoke "tar" "-xf" #$(package-source clang-runtime-15)
-                   "-C" "src/llvm-project/compiler-rt" "--strip-components=1")))
-             (add-after 'enable-codegen-tests 'enable-profiling
+                 (copy-recursively
+                   (string-append (assoc-ref inputs "clang-source")
+                                  "/compiler-rt")
+                   "src/llvm-project/compiler-rt")))
+             (add-after 'configure 'enable-profiling
                (lambda _
                  (substitute* "config.toml"
                    (("^profiler =.*$") "")
@@ -1315,10 +1316,13 @@ (define-public rust
       (inputs
        (modify-inputs (package-inputs base-rust)
                       (prepend curl libffi `(,nghttp2 "lib") zlib)))
-      ;; Add test inputs.
-      (native-inputs (cons* `("gdb" ,gdb/pinned)
-                            `("procps" ,procps)
-                            (package-native-inputs base-rust))))))
+      (native-inputs (cons*
+                      ;; Keep in sync with the llvm used to build rust.
+                      `("clang-source" ,(package-source clang-runtime-15))
+                      ;; Add test inputs.
+                      `("gdb" ,gdb/pinned)
+                      `("procps" ,procps)
+                      (package-native-inputs base-rust))))))
 
 (define*-public (make-rust-sysroot target)
   (make-rust-sysroot/implementation target rust))
-- 
2.45.2





This bug report was last modified 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.