From patchwork Fri Jan 24 16:38:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 37670 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 CD8E627BBEA; Fri, 24 Jan 2025 16:42:03 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED 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 51C3027BBE2 for ; Fri, 24 Jan 2025 16:42:02 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbMjS-0004Ou-HH; Fri, 24 Jan 2025 11:40:34 -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 1tbMiz-00046l-2A for guix-patches@gnu.org; Fri, 24 Jan 2025 11:40:05 -0500 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 1tbMiy-0008Je-Bo; Fri, 24 Jan 2025 11:40:04 -0500 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=1w+uHLWdodNIk65QZFrUTWWHUo7lJ3o1newl9KmL6Aw=; b=YIvAQVS/pqulBq5i6TI3wQMUZ9j0VHl6UNpnxXoL1lYrnqz+FTBUKeteqeDa9GXw9pgQFGiK6OBxZ8KQqDvvPGZ3UhoZ4DQIN1yuVn6ByUeVv27fhCtCE3accWWHbaPtwLvbH58WJqrASXbgL2JscO4O3N0YWMzzc67TFXNYLKQYzTuM1f6AuwTnMsP6s6Zols2TroP7i4s5v/ujz5nO+VA7AZ9brSjXQTyWvbrfW89NJRJZJN4IiShk01aQ5zcXphK0QTO6urs3LQWa7qM6w0MPj5JYGO9G59agps+tla7dE9LnmuWclLWYWiWw3frPEWyfbTJWZVzLbeREcWIaJg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tbMiw-000165-Qg; Fri, 24 Jan 2025 11:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75051] [PATCH v2 01/15] guix: Add loongarch platform. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 24 Jan 2025 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75051 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75051@debbugs.gnu.org Cc: Zheng Junjie <873216071@qq.com>, Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 75051-submit@debbugs.gnu.org id=B75051.17377367754047 (code B ref 75051); Fri, 24 Jan 2025 16:40:02 +0000 Received: (at 75051) by debbugs.gnu.org; 24 Jan 2025 16:39:35 +0000 Received: from localhost ([127.0.0.1]:46715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbMiU-00013C-Qw for submit@debbugs.gnu.org; Fri, 24 Jan 2025 11:39:35 -0500 Received: from smtp81.cstnet.cn ([159.226.251.81]:49370 helo=cstnet.cn) by debbugs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1tbMiR-00012r-Ta for 75051@debbugs.gnu.org; Fri, 24 Jan 2025 11:39:33 -0500 Received: from m.tailaa68d.ts.net (unknown [107.174.64.25]) by APP-03 (Coremail) with SMTP id rQCowABnbAw1wpNnvBI5CQ--.23013S2; Sat, 25 Jan 2025 00:39:22 +0800 (CST) From: Zheng Junjie Date: Sat, 25 Jan 2025 00:38:59 +0800 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: rQCowABnbAw1wpNnvBI5CQ--.23013S2 X-Coremail-Antispam: 1UD129KBjvJXoWxGry7Xry5JF17AF4ftr1fWFg_yoW5tr1Dpr Z7ur4fWrn7Wr92qwn3Ja45Xrs0vrnYgF12q3W3WFy8A3s8Xr1kZa9FqFyfJF9rJw1UC3Wa qF1vv3sruF48Z3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUyFb7Iv0xC_tr1lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVWUJVW8JwA2z4x0Y4vEx4 A2jsIEc7CjxVAFwI0_Jr0_Gr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IE w4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMc vjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x0EwIxGrwCFx2Iq xVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r 106r1rMI8E67AF67kF1VAFwI0_Jrv_JF1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AK xVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7 xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_ GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8c6pPUUUUU== X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ 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: Zheng Junjie <873216071@qq.com> * Makefile.am (MODULES): Add loongarch platform module. * doc/guix.texi: Add documentation for loongarch platform. * guix/platforms/loongarch.scm (loongarch64-linux): New variable. Change-Id: I71b8f3cb3b2f0d9562bbbefdc1f2fc4b2dcc4fbb --- Makefile.am | 1 + doc/guix.texi | 7 ++++++- guix/platforms/loongarch.scm | 30 ++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 guix/platforms/loongarch.scm diff --git a/Makefile.am b/Makefile.am index f911d432dd0..f759803b8b1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -140,6 +140,7 @@ MODULES = \ guix/platform.scm \ guix/platforms/arm.scm \ guix/platforms/avr.scm \ + guix/platforms/loongarch.scm \ guix/platforms/mips.scm \ guix/platforms/or1k.scm \ guix/platforms/powerpc.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index a8d69fe73f3..b1463387f3a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -116,7 +116,7 @@ Copyright @copyright{} 2023 Karl Hallsby@* Copyright @copyright{} 2023 Nathaniel Nicandro@* Copyright @copyright{} 2023 Tanguy Le Carrour@* -Copyright @copyright{} 2023, 2024 Zheng Junjie@* +Copyright @copyright{} 2023-2024 Zheng Junjie@* Copyright @copyright{} 2023 Brian Cully@* Copyright @copyright{} 2023 Felix Lechner@* Copyright @copyright{} 2023 Foundation Devices, Inc.@* @@ -17044,6 +17044,7 @@ Cross-Compilation - i586-pc-gnu - i686-linux-gnu - i686-w64-mingw32 + - loongarch64-linux-gnu - mips64el-linux-gnu - or1k-elf - powerpc-linux-gnu @@ -49358,6 +49359,10 @@ Supported Platforms Platform targeting ARM v8 CPU running GNU/Linux. @end defvar +@defvar loongarch64-linux +Platform targeting loongarch 64-bit CPU running GNU/Linux. +@end defvar + @defvar mips64-linux Platform targeting MIPS little-endian 64-bit CPU running GNU/Linux. @end defvar diff --git a/guix/platforms/loongarch.scm b/guix/platforms/loongarch.scm new file mode 100644 index 00000000000..f5696693730 --- /dev/null +++ b/guix/platforms/loongarch.scm @@ -0,0 +1,30 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix platforms loongarch) + #:use-module (guix platform) + #:use-module (guix records) + #:export (loongarch64-linux)) + +(define loongarch64-linux + (platform + (target "loongarch64-linux-gnu") + (system #f) + (linux-architecture "loongarch") + (rust-target "loongarch64-unknown-linux-gnu") + (glibc-dynamic-linker "/lib/ld-linux-loongarch-lp64d.so.1")))