From unknown Fri Jun 13 11:15:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46059] [PATCH] Enable riscv-elf targets Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Jan 2021 22:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46059 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46059@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Reply-To: Ekaitz Zarraga Received: via spool by submit@debbugs.gnu.org id=B.161143927714511 (code B ref -1); Sat, 23 Jan 2021 22:02:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jan 2021 22:01:17 +0000 Received: from localhost ([127.0.0.1]:35499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Qy5-0003lh-9t for submit@debbugs.gnu.org; Sat, 23 Jan 2021 17:01:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:50436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Qy4-0003kv-GI for submit@debbugs.gnu.org; Sat, 23 Jan 2021 17:01:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Qy4-0000bM-8K for guix-patches@gnu.org; Sat, 23 Jan 2021 17:01:16 -0500 Received: from mail1.protonmail.ch ([185.70.40.18]:58216) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Qxy-0005n5-VV for guix-patches@gnu.org; Sat, 23 Jan 2021 17:01:15 -0500 Date: Sat, 23 Jan 2021 22:00:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail3; t=1611439265; bh=bShyVrRW2/sA3EsgwDH7kzHJ45a7bGYB8nJ5xToC9S8=; h=Date:To:From:Reply-To:Subject:From; b=CmqLncxhIG30Naw6InSLbLFbPkx7lqykxi1nhWLNuSSaBVt/gFJ99+8rHjp+p+QMc aRFNaKuJiRfWiN3vSFJxDAqlwIY3seq52Xgo0btPk7dqWEeaoV2Fkx4cNfSuQlTAI3 +i/QkwlcCV5+sSOlj2lqev3IqsUi31JAb/Ic1bDSJYRhOTfXM+wA4gXsjDceS2eJKi HiF+AwH57GTf/UIO8LRB2ku75oy0+ymogn4AoQUHHZ/NKymZTvpdsvo/JfkAbyU89E hqdk8+kSEA+05ZGKcA+waFh9Is8GVpul++tWBZPf2EZCYWJuybqFexxvWXPfFLN2Ol qPqTbl/ojTyEw== From: Ekaitz Zarraga Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.40.18; envelope-from=ekaitz@elenq.tech; helo=mail1.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, I've been struggling to make a RISC-V cross compiler. This `manifest.scm` file failed to create because there was no available dynamic linker for the targets which, in the end, don't need any dynamic linker: manifest.scm: ``` scm (use-modules (gnu packages cross-base) (gnu packages embedded) (gnu packages man)) (packages->manifest `(,@(let* ((triplet "riscv32-unknown-elf") (binutils (cross-binutils triplet))) (list binutils (cross-gcc triplet #:xbinutils binutils #:libc #f))) ,man-db)) ``` I realized there were some targets missing (and there are more!) in the bootstrap.scm file, so I think adding them is harmless and lets us make cross compilers that are not available otherwise. I'd like to add riscv32-linux too, but that involves setting the correct path and I don't know it. Hope this patch is helpful. >From 58785556b7448cfe32916d3842bce398b360c2de Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Sat, 23 Jan 2021 22:50:44 +0100 Subject: [PATCH] gnu: glibc-dynamic-linker: Add riscv*-elf targets * gnu/packages/bootstrap.scm: (glibc-dynamic-linker): Set riscv64-*-elf targets to "no-ld" --- gnu/packages/bootstrap.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index c39e60ec8b..8566d11284 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -302,6 +302,8 @@ or false to signal an error." ((string=3D? system "i686-mingw") "no-ld.so") ((string=3D? system "x86_64-mingw") "no-ld.so") ((string=3D? system "vc4-elf") "no-ld.so") + ((string=3D? system "riscv32-elf") "no-ld.so") + ((string=3D? system "riscv64-elf") "no-ld.so") (else (error "dynamic linker name not known for this system" system)))) -- 2.29.2 From unknown Fri Jun 13 11:15:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46059] More info about other targets References: In-Reply-To: Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Jan 2021 23:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46059 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "46059@debbugs.gnu.org" <46059@debbugs.gnu.org> Reply-To: Ekaitz Zarraga Received: via spool by 46059-submit@debbugs.gnu.org id=B46059.161144429926025 (code B ref 46059); Sat, 23 Jan 2021 23:25:02 +0000 Received: (at 46059) by debbugs.gnu.org; 23 Jan 2021 23:24:59 +0000 Received: from localhost ([127.0.0.1]:35604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3SH4-0006lh-SP for submit@debbugs.gnu.org; Sat, 23 Jan 2021 18:24:59 -0500 Received: from mail-40133.protonmail.ch ([185.70.40.133]:47814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3SH1-0006lT-HK for 46059@debbugs.gnu.org; Sat, 23 Jan 2021 18:24:58 -0500 Date: Sat, 23 Jan 2021 23:24:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail3; t=1611444288; bh=+oTk0j4FtC60GSsGI3mrj6sVhjt5okLBIW7/3VwT5CU=; h=Date:To:From:Reply-To:Subject:From; b=bqBDpIrMtH78gSqRI5zONiuhz7tmIweGPnNwYJdVysyKqD5qHYXRikdAyTFgwY4vP tRaPZqrE+Tl0y/ucjIpC3cuG1Z8/HRfv0MHkPxglL7PSEf4ELd0XNbC+51td7wmvmw /zj2Lp+SFJUXCp1k/EdcrWmu5t4cdz9A9MKKXyNmKQFyuit5ZaPXAzdKXZa69sHz5B EGLc86YfuZ6F3yMg7ieaO13icaoj2nc9ijHpNYmtAuHMLazJ+hBGWaAl+sxhqfla0C EtumY3PFWKjqDGpZj/7wUjQ0/C83qqzSXasDWksNB8exyH8nxeHk3Xtj+zwmvZy8CD vhTEO+jpT5vFg== From: Ekaitz Zarraga Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This issue from RISC-V GNU Toolchain has more information related with the issue described: https://github.com/riscv/riscv-gnu-toolchain/pull/136 From unknown Fri Jun 13 11:15:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#46059] More info about other targets Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 Jan 2021 17:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46059 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "46059@debbugs.gnu.org" <46059@debbugs.gnu.org> Reply-To: Ekaitz Zarraga Received: via spool by 46059-submit@debbugs.gnu.org id=B46059.161150816412979 (code B ref 46059); Sun, 24 Jan 2021 17:10:02 +0000 Received: (at 46059) by debbugs.gnu.org; 24 Jan 2021 17:09:24 +0000 Received: from localhost ([127.0.0.1]:37067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3itA-0003NH-0v for submit@debbugs.gnu.org; Sun, 24 Jan 2021 12:09:24 -0500 Received: from mail2.protonmail.ch ([185.70.40.22]:48543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3it6-0003My-4s for 46059@debbugs.gnu.org; Sun, 24 Jan 2021 12:09:22 -0500 Date: Sun, 24 Jan 2021 17:09:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail3; t=1611508153; bh=SAv5q8nTXl6/n24sNTTD2psmR10mAjwNOzDw+02UfSI=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=S1QuuUWk/MkVvnNziyqlK8vwclz7T/cSvbbXp7iqGwfyTRT0ZP5XI1zxWGsze7wgw PVSuKAjP47iV2aEk5rhck13biW6UySUBEkB1gJc34YV6CsRJuwqEcXpr290R+SMcMG dggZmUDeuQyFLcFLe8oTMmb6+lkd35SORbi4Ck3WXrZmym5MsmD7JMyKme6lHr0hmI 9js4A/HWmw0PYyv5WsQPgvhZAJhQoiEkIwsFWW1T3qNityxl1lzFFJJHvd7Vv6mfC7 ZCJxBKG4R6aLKT601eMb5C5G83TLQM4aEgd0nMhH9DaAGW4crX99dS7sPMAgFLwGwV BJ6qnhaQRDqxw== From: Ekaitz Zarraga Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) For more information on the dynamic linker names I didn't know: lp32, ilp32f and ilp32d are the ABI. i -> integer l -> long p -> pointer f -> float d -> double The chars in the beginning indicate what kind of data is sent to 32 bit reg= isters. The suffix says which ones are sent to floating point registers. So in ilp32 floating point numbers are sent to integer registers, while in = ilp32d double precision numbers are sent to floating point registers. Not every ABI is compatible with every single RISC-V configuration. RV32I f= or instance, doesn't support floating point numbers (they are supported in = the F extension) so it doesn't provide floating point registers meaning tha= t it's not able to use any ABI that has a `d` or an `f` as suffix. But RISC-V configurations with floating point modules can actually run the = simplest ABI if they want so we probably need to add many entries here :) Does this make sense?