guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#46059] [PATCH] Enable riscv-elf targets


From: Ekaitz Zarraga
Subject: [bug#46059] [PATCH] Enable riscv-elf targets
Date: Sat, 23 Jan 2021 22:00:58 +0000

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 <ekaitz@elenq.tech>
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=? 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))))
--
2.29.2







reply via email to

[Prev in Thread] Current Thread [Next in Thread]