From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aJErCAbE7mFJ+gAAgWs5BA (envelope-from ) for ; Mon, 24 Jan 2022 16:21:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gCSTBAbE7mGglQAAauVa8A (envelope-from ) for ; Mon, 24 Jan 2022 16:21:42 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 558E543CED for ; Mon, 24 Jan 2022 16:21:41 +0100 (CET) Received: from localhost ([::1]:39504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nC1A3-0000Fe-Ob for larch@yhetil.org; Mon, 24 Jan 2022 10:21:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nC19w-0000EE-St for guix-patches@gnu.org; Mon, 24 Jan 2022 10:21:33 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nC19S-0006zC-B7 for guix-patches@gnu.org; Mon, 24 Jan 2022 10:21:19 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nC19S-00023D-2a for guix-patches@gnu.org; Mon, 24 Jan 2022 10:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53503] [PATCH] gnu: Add %final-inputs-riscv64. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 24 Jan 2022 15:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53503 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53503@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16430376137788 (code B ref -1); Mon, 24 Jan 2022 15:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jan 2022 15:20:13 +0000 Received: from localhost ([127.0.0.1]:45367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nC18Z-00021M-4V for submit@debbugs.gnu.org; Mon, 24 Jan 2022 10:20:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:41598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nC18V-00021B-TW for submit@debbugs.gnu.org; Mon, 24 Jan 2022 10:20:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nC18V-00005r-OM for guix-patches@gnu.org; Mon, 24 Jan 2022 10:20:03 -0500 Received: from flashner.co.il ([178.62.234.194]:39440) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nC18T-0006kt-Ki for guix-patches@gnu.org; Mon, 24 Jan 2022 10:20:03 -0500 Received: from localhost (unknown [31.210.177.79]) by flashner.co.il (Postfix) with ESMTPSA id 27E9C40455; Mon, 24 Jan 2022 15:20:00 +0000 (UTC) From: Efraim Flashner Date: Mon, 24 Jan 2022 17:19:26 +0200 Message-Id: <684a9e686ef9d8d326fefb4de794bd661fab564f.1643037303.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643037701; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tFBrPa11+Te//KdPpIbBJ53JxE45oDjhJyEFGJkDSQw=; b=lno/gk66RqTpCHp6PglhaF5Yr+n0i/9rn1/Oi0QRjJylazbI7g0F2z1Den2YVmfv+Zxuat f0FoGzxD+VELyopmXPg4gYufLdQ+PC21nEMSZTvlhKHHJFMAmG464KuobP+bW2mvFg1n1b ferVqL2L6tGonkvF8tQaGF6EWDcu+S+nITzxG5DrlDFws3tgjxDZpY9+/86+uNJL6PdW0s VArM9mwpF/aW+xBkspAQIreTRTAI0296GAAUO/w9wlkmZH/GPPWYUtvbdsgvBGwblU6xGC bKvDUCQKOyD73fS2GHMKwZyWW5BmjacQEBkHnriuabS3wQAz5eRyHQIQW6GwHA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643037701; a=rsa-sha256; cv=none; b=YDoO7d78ux/xQAtENovCkf8iTbDIxGoCB77hbcbvhxF97FBtCu3F42fDbDdygjqq8Cs0Eu OvPYpCo/ijiTr/wbiZT5zKQso+hkS7EDrwjg7rcSBrM97FZW2GXdDwrLmqbLPc5ZOoEyUj LfOczSA6hEmsGeBDVG6a7He7D2tzc4nfnbwV3q5ZnXvWj4+Q1cAIbWphV8xxrqPcG6KCo+ O3Mz+FUKjyykKGOWjJ+gIwXXYGuZ55uzEcUcqbieaubqW2XTCLQ5Dd3c04Troz9M1aRmNQ I3BTFtL77SkJFl5PcHmTQB/viXkw+Jmo9F1QqndBaZHjscZCXCr2Yhp0PUi6Tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.33 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 558E543CED X-Spam-Score: -2.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: Xiqlgh6BNenU * gnu/packages/commencement.scm (%final-inputs-riscv64): New variable. * guix/build-system/gnu.scm (standard-inputs): Use %final-inputs-riscv64 when targeting riscv64-linux. --- This is the final piece needed to make hello (and most other packages) build on riscv64-linux, when offloading from a non-riscv64 machine or when built natively. Commit 94c70b5440334c7c844e20350351bd5565aff137 from the wip-riscv branch only worked when building natively on riscv64 since %final-inputs is sourced first, then the actual system it is going to be built on. I believe this is due to the lazy resolving of (gnu packages commencement) and %final inputs. Due to the above I was unable to start from the commit on wip-riscv and use parameterize to override %current-system, since by the time that part of the code was reached %final-inputs was already evaluated. gnu/packages/commencement.scm | 6 +++++- guix/build-system/gnu.scm | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 26769d2626..96d914344d 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014 Andreas Enge ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2014, 2015, 2017 Mark H Weaver -;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner +;;; Copyright © 2017, 2018, 2019, 2021, 2022 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2019, 2020, 2021 Marius Bakke @@ -3736,6 +3736,10 @@ (define-public %final-inputs ("libc:static" ,glibc-final "static") ("locales" ,glibc-utf8-locales-final)))) +(define-public %final-inputs-riscv64 + `(("gcc:lib" ,gcc-final "lib") + ,@%final-inputs)) + (define-public canonical-package (let ((name->package (fold (lambda (input result) (match input diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 651415098e..2f74000eef 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -273,7 +273,9 @@ (define (standard-packages) ;; Resolve (gnu packages commencement) lazily to hide circular dependency. (let ((distro (resolve-module '(gnu packages commencement)))) - (module-ref distro '%final-inputs))) + (if (target-riscv64?) + (module-ref distro '%final-inputs-riscv64) + (module-ref distro '%final-inputs)))) (define* (lower name #:key source inputs native-inputs outputs target base-commit: 1bfd634e335702d0b9b0189d685d14ec79f1cbf6 -- 2.34.0