From patchwork Mon May 23 08:33:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 39578 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 AD5F027BBEA; Mon, 23 May 2022 09:34:17 +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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable 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 773E427BBE9 for ; Mon, 23 May 2022 09:34:17 +0100 (BST) Received: from localhost ([::1]:55526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nt3W4-000197-MH for patchwork@mira.cbaines.net; Mon, 23 May 2022 04:34:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt3Vq-00018v-ME for guix-patches@gnu.org; Mon, 23 May 2022 04:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nt3Vq-0006Dk-EE for guix-patches@gnu.org; Mon, 23 May 2022 04:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nt3Vq-00087h-Bf for guix-patches@gnu.org; Mon, 23 May 2022 04:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55591] [PATCH] WIP: fix the linux build system Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 May 2022 08:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55591 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55591@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165329482231193 (code B ref -1); Mon, 23 May 2022 08:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 May 2022 08:33:42 +0000 Received: from localhost ([127.0.0.1]:47237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nt3VW-000872-Hx for submit@debbugs.gnu.org; Mon, 23 May 2022 04:33:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:55614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nt3VV-00086v-1X for submit@debbugs.gnu.org; Mon, 23 May 2022 04:33:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nt3VU-00016K-Lc for guix-patches@gnu.org; Mon, 23 May 2022 04:33:40 -0400 Received: from mira.cbaines.net ([212.71.252.8]:36344) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nt3VP-0006BS-Qp for guix-patches@gnu.org; Mon, 23 May 2022 04:33:37 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699]) by mira.cbaines.net (Postfix) with ESMTPSA id C569827BBE9 for ; Mon, 23 May 2022 09:33:32 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id d72e496c for ; Mon, 23 May 2022 08:33:32 +0000 (UTC) From: Christopher Baines Date: Mon, 23 May 2022 09:33:32 +0100 Message-Id: <20220523083332.21626-1-mail@cbaines.net> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net 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, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- gnu/platform.scm | 6 +++++- guix/build-system/linux-module.scm | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/platform.scm b/gnu/platform.scm index fdc3685e7c..91a1854e68 100644 --- a/gnu/platform.scm +++ b/gnu/platform.scm @@ -66,10 +66,14 @@ (define-record-type* platform make-platform platform? (target platform-target) (system platform-system) - (linux-architecture platform-linux-architecture + (linux-architecture platform-linux-architecture* (default #f)) (glibc-dynamic-linker platform-glibc-dynamic-linker)) +;; Provide a procedure so this can be used via module-ref +(define (platform-linux-architecture platform) + (platform-linux-architecture* platform)) + ;;; ;;; Platforms. diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm index 761ebe25b1..78a3ba95b2 100644 --- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -51,7 +51,8 @@ (define (default-linux) (define (system->arch system) (let ((module (resolve-interface '(gnu platform)))) - ((module-ref module 'lookup-platform-by-target-or-system) system))) + ((module-ref module 'platform-linux-architecture) + ((module-ref module 'lookup-platform-by-target-or-system) system)))) (define (make-linux-module-builder linux) (package