From patchwork Sat Jan 23 22:00:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ekaitz Zarraga X-Patchwork-Id: 26588 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 0A98927BC18; Sat, 23 Jan 2021 22:02:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7C55827BC17 for ; Sat, 23 Jan 2021 22:02:22 +0000 (GMT) Received: from localhost ([::1]:57032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3Qz7-0000y8-HY for patchwork@mira.cbaines.net; Sat, 23 Jan 2021 17:02:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Qyo-0000xv-8x for guix-patches@gnu.org; Sat, 23 Jan 2021 17:02:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Qyn-00068z-WC for guix-patches@gnu.org; Sat, 23 Jan 2021 17:02:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l3Qyn-0004LT-UB for guix-patches@gnu.org; Sat, 23 Jan 2021 17:02:01 -0500 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" 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 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-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: , Reply-To: Ekaitz Zarraga Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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(+) -- 2.29.2 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=? system "i686-mingw") "no-ld.so") ((string=? system "x86_64-mingw") "no-ld.so") ((string=? system "vc4-elf") "no-ld.so") + ((string=? system "riscv32-elf") "no-ld.so") + ((string=? system "riscv64-elf") "no-ld.so") (else (error "dynamic linker name not known for this system" system))))