From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cNutOKrH8GP10AAAbAwnHQ (envelope-from ) for ; Sat, 18 Feb 2023 13:42:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ICSrOKrH8GNp3QAA9RJhRA (envelope-from ) for ; Sat, 18 Feb 2023 13:42:18 +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 AC64C2CD8E for ; Sat, 18 Feb 2023 13:42:18 +0100 (CET) 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?Q?=E8=B7=AF=E8=BE=89?= 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?Q?=E8=B7=AF=E8=BE=89?= Date: Sat, 18 Feb 2023 12:41:16 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676724138; a=rsa-sha256; cv=none; b=i9Pob/XbsJ+ccgln97XVFreNDe8rNo7GP3CzXloRsmkXcQcIwWrR6/6RnjBPGYfFIAEBzu hT0JOFK2M4bdDf2hEP5Qj5+m38NlctlWnQoRDSuPRK/2UYDauIjNJvzP2DwB0rNzymJcLG HIm0IgGQjEeMVjlcOCZfiNRfTCi21KzWlIRHwx6TkdJ7yyEOv1R2k9kV6uTaB9yO2uGvW+ oJ55CMycXqhFzW8NmQ8yWSbD1pnm2COkGk4UtNDZY4gMCAGurZKab/GFc8b/S0mMlKt+Pr KG3cwnEbBJCi6BVU0xG1G49FjFsl2RxZiQnfD1GhlS9aBlOqUpQoqfavNf3Glg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=aXz2DEyC; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676724138; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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:dkim-signature; bh=Z/WV7VzbhdB/gmwDoDufBpVltJV9vonA8PenP99ppIQ=; b=qMng9urPMzpcRW0LA8ySFdgqL/x9IuonIBjJhvg9saB//9i3OBMvPyyYWYRWrQW+K7zcy8 47QF3fZhm6WYmweGu77DuyTWu4OSxsaYnajcwmIEzrB9+BCymzatN2e1sHoYPVD7qBaETG lFht1PvPk7ywMEsNVzyNSqlnS66N3qborS0u97whYg+hDhs0HWIJM/k4hZRjlK2NWYRwYW vK7mP/37/tyYB8KYHNBg3964No3OvsIzg3EjpyDhhkifhTLpndnMJF3NandbYwTyxxbZgR Xz2/EHePn71I2r8zbGGgJz4mSBHzJ6o89asvgBXN+FotO0lXuLliMEZkL0ecDw== X-Migadu-Queue-Id: AC64C2CD8E X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.23 X-Spam-Score: -2.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=aXz2DEyC; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-TUID: 9Nm/NV+4QJB1 >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(-) 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 =C2=A9 2022 Mathieu Othacehe +;;; Copyright =C2=A9 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 =C2=A9 2022 Denis 'GNUtoo' Carikli ;;; Copyright =C2=A9 2022 Antero Mejr ;;; Copyright =C2=A9 2023 Philip McGrath +;;; Copyright =C2=A9 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)))) (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" --=20 2.39.1