guix-patches
[Top][All Lists]
Advanced

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

[bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.


From: Efraim Flashner
Subject: [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
Date: Tue, 9 May 2023 18:55:32 +0300

On Sun, May 07, 2023 at 09:22:25PM +0800, 宋文武 wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > I have a couple of dummy *-elf systems I sometimes add and remove
> > depending on what I'm working on. What do you think about adding and
> > entry for ((string-suffix? "-elf" system) "no-ld.so") and being done
> > with these one-off targets?
> 
> I think that's fine, or how about only error for '-linux' or '-gnu'
> systems, i think that's where a glibc linker is needed.

I do like the idea of having the fallback for typo-ed names, so let's
keep that error there, but I think you're right that we can just use
no-ld.so for everything else. Then if we do need an actual linker later
for another architecture we can add it then.

> From 2a972a30b9fcf743036bf9e81044e79854b62fde Mon Sep 17 00:00:00 2001
> Message-Id: 
> <2a972a30b9fcf743036bf9e81044e79854b62fde.1683465580.git.iyzsong@member.fsf.org>
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@member.fsf.org>
> Date: Sun, 7 May 2023 21:15:20 +0800
> Subject: [PATCH] gnu: Use dummy linker for systems without a 'linux' or 'gnu'
>  suffix.
> 
> * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Use dummy linker for
> systems without a 'linux' or 'gnu' suffix.
> ---
>  gnu/packages/bootstrap.scm | 18 +++++-------------
>  1 file changed, 5 insertions(+), 13 deletions(-)
> 
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index 9a46f97c81..12a84b8265 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -323,19 +323,11 @@ (define* (glibc-dynamic-linker
>       ((string=? system "powerpc64-linux") "/lib/ld64.so.1")
>       ((string=? system "alpha-linux") "/lib/ld-linux.so.2")
>  
> -     ;; XXX: This one is used bare-bones, without a libc, so add a case
> -     ;; here just so we can keep going.
> -     ((string=? system "arm-elf") "no-ld.so")
> -     ((string=? system "arm-eabi") "no-ld.so")
> -     ((string=? system "xtensa-elf") "no-ld.so")
> -     ((string=? system "avr") "no-ld.so")
> -     ((string=? system "propeller-elf") "no-ld.so")
> -     ((string=? system "i686-mingw") "no-ld.so")
> -     ((string=? system "x86_64-mingw") "no-ld.so")
> -     ((string=? system "vc4-elf") "no-ld.so")
> -
> -     (else (error "dynamic linker name not known for this system"
> -                  system)))))
> +     ((or (string-suffix? "-linux" system) (string-suffix? "-gnu" system))
> +      (error "dynamic linker name not known for this system" system))
> +
> +     ;; For bare-bones without a libc, eg: arm-elf, arm-eabi, xtensa-elf, 
> etc.
> +     (else "no-ld.so"))))
>  
>  
>  ;;;
> 
> base-commit: 7612610c44f16fc8f2ff395d9a2d58101a7356aa
> -- 
> 2.39.2
> 

> 
> 
> (I'm unable to write a satisfied commit message..)


-- 
Efraim Flashner   <efraim@flashner.co.il>   פלשנר אפרים
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature


reply via email to

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