From patchwork Sat Feb 18 12:41:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?6Lev6L6J?= X-Patchwork-Id: 47100 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 4DFD31685F; Sat, 18 Feb 2023 12:42:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 826AD163CB for ; Sat, 18 Feb 2023 12:42:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTMXV-0000Gf-DG; Sat, 18 Feb 2023 07:42:05 -0500 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 1pTMXS-0000BR-O2 for guix-patches@gnu.org; Sat, 18 Feb 2023 07:42:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTMXS-00039l-Eo for guix-patches@gnu.org; Sat, 18 Feb 2023 07:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTMXS-000594-4f for guix-patches@gnu.org; Sat, 18 Feb 2023 07:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61604] [PATCH] platforms: allow cross-target mipsel-linux-gnu Resent-From: =?utf-8?b?6Lev6L6J?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Feb 2023 12:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61604 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61604@debbugs.gnu.org X-Debbugs-Original-To: guix-patches Received: via spool by submit@debbugs.gnu.org id=B.167672408419733 (code B ref -1); Sat, 18 Feb 2023 12:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Feb 2023 12:41:24 +0000 Received: from localhost ([127.0.0.1]:42740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTMWq-00058B-0c for submit@debbugs.gnu.org; Sat, 18 Feb 2023 07:41:24 -0500 Received: from lists.gnu.org ([209.51.188.17]:48360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTMWn-000583-KC for submit@debbugs.gnu.org; Sat, 18 Feb 2023 07:41:22 -0500 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 1pTMWn-0008GV-Bl for guix-patches@gnu.org; Sat, 18 Feb 2023 07:41:21 -0500 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pTMWj-0002t1-SQ for guix-patches@gnu.org; Sat, 18 Feb 2023 07:41:19 -0500 Received: by mail-ed1-x544.google.com with SMTP id dm15so3598181edb.0 for ; Sat, 18 Feb 2023 04:41:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Z/WV7VzbhdB/gmwDoDufBpVltJV9vonA8PenP99ppIQ=; b=aXz2DEyC7iJzsyQ08/zxKhZSC7nyBOgY441vA2ts8Iq3pw9E0y8MaL21wmNqSohQLw sQt6mZ7QDFdPsdcgJfMNRXZLssLU97OlD8n02U6ogAodtg6fbfrQiZ3BL4C7dFOjdmW9 T3joAB8bswEtnImbYw+3lfxrpltr2z13ADQ5DhyNm++HIbuMGEBu5FaahGyBsoOX12QB 8B5lj7KrV2vEc58y6t/D6G/LvqKgNigRf02kl9YMnvszIzjSLjpUypiis9qmwqsHOcPX Q0WnDiIfC7wD43kctw/6cw7WFGieHdf40FlQP9LnpjtJugJf63ObmaYhYtftx31Gew2M q5GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z/WV7VzbhdB/gmwDoDufBpVltJV9vonA8PenP99ppIQ=; b=WBFocHBS9cBwglplB79PZ3Hf/vG3c1Jm9KY2y6Jte18rNiaWWRRbkWnIgOz6bP/A6t vjYiwRKxUAYcYkS7blUJq2DyFDlnSuigQrUD1N64X1B0eBskMfQ88fS4hauK4kR/A8CK HxUlmaxucWXAANSTrhvPZkOoutx9z1LiZOR/vnabi2di+3wHmMmALjxnS/C53DCDo+8z y5fuT2h6Nn8Aj0VJuZyWDPfNgNp0PZS6uOR51DrD8rn7k8/5nRk15ifwlMbbGvIkHQjG AR1a/XtWjpGmAkbu7a9EQhpEJy5n93Ju/FpDZJApyIhLazJhDBdB2+kE4uOhDWyPj3io zb8w== X-Gm-Message-State: AO0yUKUkJW6MdHzoItpJaY+QXA9E7soqbw8xBjnT0TAWhsXauC+E4APg qUm0o06kHGxkR0MOmBQilGar2jwzfvbU4g2syiUwDrXrj/TIPg== X-Google-Smtp-Source: AK7set9awy/PLKFn9gk58kUnKscoeU1OSqtCEOVv4siCQJ7WgNuXi5VUpZSAadrMOQaTxCvqGdkcPTKd0mTd/OBfFtI= X-Received: by 2002:a17:907:787:b0:8ae:98b3:2b0e with SMTP id xd7-20020a170907078700b008ae98b32b0emr6267568ejb.3.1676724076663; Sat, 18 Feb 2023 04:41:16 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6f02:8341:b0:47:ad96:cfca with HTTP; Sat, 18 Feb 2023 04:41:16 -0800 (PST) From: =?utf-8?b?6Lev6L6J?= Date: Sat, 18 Feb 2023 12:41:16 +0000 Message-ID: Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=luhux76@gmail.com; helo=mail-ed1-x544.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From 9a111fd886b89914bd6bafe8202b8a9a1dce7017 Mon Sep 17 00:00:00 2001 From: LuHui Date: Sat, 18 Feb 2023 20:35:37 +0800 Subject: [PATCH] platforms: allow cross-target mipsel-linux-gnu * guix/platforms/mips.scm (mips-linux) : new variable. * guix/utils.scm (target-mipsel?) : new function. --- guix/platforms/mips.scm | 10 +++++++++- guix/utils.scm | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" diff --git a/guix/platforms/mips.scm b/guix/platforms/mips.scm index e6fa9eb292..c37c8bb292 100644 --- a/guix/platforms/mips.scm +++ b/guix/platforms/mips.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Mathieu Othacehe +;;; Copyright © 2023 Lu Hui ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,7 +20,7 @@ (define-module (guix platforms mips) #:use-module (guix platform) #:use-module (guix records) - #:export (mips64-linux)) + #:export (mips64-linux mips-linux)) (define mips64-linux (platform @@ -27,3 +28,10 @@ (define mips64-linux (system "mips64el-linux") (linux-architecture "mips") (glibc-dynamic-linker "/lib/ld.so.1"))) + +(define mips-linux + (platform + (target "mipsel-linux-gnu") + (system "mipsel-linux") + (linux-architecture "mips") + (glibc-dynamic-linker "/lib/ld.so.1"))) diff --git a/guix/utils.scm b/guix/utils.scm index 774b80cd25..55af3562eb 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; Copyright © 2022 Antero Mejr ;;; Copyright © 2023 Philip McGrath +;;; Copyright © 2023 Lu Hui ;;; ;;; This file is part of GNU Guix. ;;; @@ -741,6 +742,10 @@ (define* (target-mips64el? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "mips64el-" target)) +(define* (target-mipsel? #:optional (target (or (%current-target-system) + (%current-system)))) + (string-prefix? "mipsel-" target)) + (define* (target-64bit? #:optional (system (or (%current-target-system) (%current-system))))