From patchwork Sat Aug 10 07:11:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 66909 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DE64027BBEA; Sat, 10 Aug 2024 08:12:47 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5633027BBE2 for ; Sat, 10 Aug 2024 08:12:47 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scgHC-0003yO-La; Sat, 10 Aug 2024 03:12:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scgHB-0003y3-BI for guix-patches@gnu.org; Sat, 10 Aug 2024 03:12:33 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1scgHB-0005zk-22 for guix-patches@gnu.org; Sat, 10 Aug 2024 03:12:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=SzAieCG25zxGacRj17EZ+PQRtpV04qe6yrAgNYV3DPw=; b=mwbNbhIh9iNagbSD4MMczUiRe9U9eO4IEgCKUxy3DhjWJOJH7BfMT14gA/34VhnqC5ms4Z1FcFIVw0LkWVZOCPgjp/LqYtW2pSGG+wxWowDUhWTb+uUpl5/MVph79kmN5T3Uq3jYQiunK7bZd3qpJsa+/8MArRmYFDesSLdTPNW+vJRBJOMZCpoeBZL8x4CyKeyU9jx4MFKrx16qCz1p57Dm4mypedgfm6Iwy1nEzQW/K9EN1OVUiuYdAlf3V8hyMB4Hx4PTOW0/V+8NjWJJqxLmwA6byiBKZVdLE3KM6SJt7ElNyWzfEdlKXqV0V99oFNuaGAMYPQI2Xtwr4as80g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1scgHd-0004vs-Va; Sat, 10 Aug 2024 03:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72553] [PATCH 2/4] gnu: rust: Fix building. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Sat, 10 Aug 2024 07:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72553 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72553@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by 72553-submit@debbugs.gnu.org id=B72553.172327397418920 (code B ref 72553); Sat, 10 Aug 2024 07:13:01 +0000 Received: (at 72553) by debbugs.gnu.org; 10 Aug 2024 07:12:54 +0000 Received: from localhost ([127.0.0.1]:38953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scgHV-0004v4-NP for submit@debbugs.gnu.org; Sat, 10 Aug 2024 03:12:54 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scgHS-0004ug-UU for 72553@debbugs.gnu.org; Sat, 10 Aug 2024 03:12:51 -0400 Received: from localhost (136.249.6.51.dyn.plus.net [51.6.249.136]) by mira.cbaines.net (Postfix) with ESMTPSA id 18E4627BBE9 for <72553@debbugs.gnu.org>; Sat, 10 Aug 2024 08:11:51 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 65c7c1ab for <72553@debbugs.gnu.org>; Sat, 10 Aug 2024 07:11:50 +0000 (UTC) From: Christopher Baines Date: Sat, 10 Aug 2024 08:11:45 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <0917fd5934be09855e7baec9901fa090d98a524b.1723273907.git.mail@cbaines.net> References: <0917fd5934be09855e7baec9901fa090d98a524b.1723273907.git.mail@cbaines.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Efraim Flashner * 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))