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

Previous Next

Package: guix-patches;

Reported by: iyzsong <at> envs.net

Date: Sun, 7 May 2023 01:32:01 UTC

Severity: normal

Tags: patch

Done: 宋文武 <iyzsong <at> envs.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63341 in the body.
You can then email your comments to 63341 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#63341; Package guix-patches. (Sun, 07 May 2023 01:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to iyzsong <at> envs.net:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 07 May 2023 01:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: iyzsong <at> envs.net
To: guix-patches <at> gnu.org
Cc: 宋文武 <iyzsong <at> member.fsf.org>
Subject: [PATCH] gnu: Add dummy linker for riscv64-elf.
Date: Sun,  7 May 2023 09:31:09 +0800
From: 宋文武 <iyzsong <at> member.fsf.org>

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for riscv64-elf.
---
 gnu/packages/bootstrap.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 9a46f97c81..7acac9dea5 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -333,6 +333,7 @@ (define* (glibc-dynamic-linker
      ((string=? system "i686-mingw") "no-ld.so")
      ((string=? system "x86_64-mingw") "no-ld.so")
      ((string=? system "vc4-elf") "no-ld.so")
+     ((string=? system "riscv64-elf") "no-ld.so")
 
      (else (error "dynamic linker name not known for this system"
                   system)))))

base-commit: 5dcfe798f44753e18104541e83591cac6e053525
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#63341; Package guix-patches. (Sun, 07 May 2023 08:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 63341 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: iyzsong <at> envs.net
Cc: 63341 <at> debbugs.gnu.org, 宋文武 <iyzsong <at> member.fsf.org>
Subject: Re: [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
Date: Sun, 7 May 2023 11:43:29 +0300
[Message part 1 (text/plain, inline)]
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?

On Sun, May 07, 2023 at 09:31:09AM +0800, iyzsong--- via Guix-patches via wrote:
> From: 宋文武 <iyzsong <at> member.fsf.org>
> 
> * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for riscv64-elf.
> ---
>  gnu/packages/bootstrap.scm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index 9a46f97c81..7acac9dea5 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -333,6 +333,7 @@ (define* (glibc-dynamic-linker
>       ((string=? system "i686-mingw") "no-ld.so")
>       ((string=? system "x86_64-mingw") "no-ld.so")
>       ((string=? system "vc4-elf") "no-ld.so")
> +     ((string=? system "riscv64-elf") "no-ld.so")
>  
>       (else (error "dynamic linker name not known for this system"
>                    system)))))
> 
> base-commit: 5dcfe798f44753e18104541e83591cac6e053525
> -- 
> 2.39.2
> 

-- 
Efraim Flashner   <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#63341; Package guix-patches. (Sun, 07 May 2023 13:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 63341 <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 63341 <at> debbugs.gnu.org, 宋文武 <iyzsong <at> member.fsf.org>
Subject: Re: [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
Date: Sun, 07 May 2023 21:22:25 +0800
[Message part 1 (text/plain, inline)]
Efraim Flashner <efraim <at> 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.


[0001-gnu-Use-dummy-linker-for-systems-without-a-linux-or-.patch (text/x-patch, inline)]
From 2a972a30b9fcf743036bf9e81044e79854b62fde Mon Sep 17 00:00:00 2001
Message-Id: <2a972a30b9fcf743036bf9e81044e79854b62fde.1683465580.git.iyzsong <at> member.fsf.org>
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong <at> 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

[Message part 3 (text/plain, inline)]

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

Information forwarded to guix-patches <at> gnu.org:
bug#63341; Package guix-patches. (Tue, 09 May 2023 15:56:01 GMT) Full text and rfc822 format available.

Message #14 received at 63341 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 宋文武 <iyzsong <at> envs.net>
Cc: 63341 <at> debbugs.gnu.org, 宋文武 <iyzsong <at> member.fsf.org>
Subject: Re: [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
Date: Tue, 9 May 2023 18:55:32 +0300
[Message part 1 (text/plain, inline)]
On Sun, May 07, 2023 at 09:22:25PM +0800, 宋文武 wrote:
> Efraim Flashner <efraim <at> 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 <at> member.fsf.org>
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong <at> 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 <at> 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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#63341; Package guix-patches. (Mon, 15 May 2023 10:17:01 GMT) Full text and rfc822 format available.

Message #17 received at 63341 <at> debbugs.gnu.org (full text, mbox):

From: iyzsong <at> envs.net
To: 63341 <at> debbugs.gnu.org
Cc: 宋文武 <iyzsong <at> member.fsf.org>,
 Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH v2] gnu: Use dummy linker for '*-elf' systems.
Date: Mon, 15 May 2023 18:16:00 +0800
From: 宋文武 <iyzsong <at> member.fsf.org>

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Return "no-ld.so" for
systems with a "-elf" suffix.
---
 gnu/packages/bootstrap.scm | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 9a46f97c81..5f6a3acc83 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -325,14 +325,11 @@ (define* (glibc-dynamic-linker
 
      ;; 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")
+     ((string-suffix? "-elf" system) "no-ld.so")
 
      (else (error "dynamic linker name not known for this system"
                   system)))))

base-commit: 79e9a70c94728272386c7e023a93aa33ebd27d34
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#63341; Package guix-patches. (Mon, 15 May 2023 10:17:02 GMT) Full text and rfc822 format available.

Message #20 received at 63341 <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 63341 <at> debbugs.gnu.org
Subject: Re: bug#63341: [PATCH] gnu: Add dummy linker for riscv64-elf.
Date: Mon, 15 May 2023 18:16:49 +0800
Efraim Flashner <efraim <at> flashner.co.il> writes:

> 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.

Okay, I send an updated patch now.




Information forwarded to guix-patches <at> gnu.org:
bug#63341; Package guix-patches. (Mon, 15 May 2023 11:56:02 GMT) Full text and rfc822 format available.

Message #23 received at 63341 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: iyzsong <at> envs.net
Cc: 63341 <at> debbugs.gnu.org, 宋文武 <iyzsong <at> member.fsf.org>
Subject: Re: [PATCH v2] gnu: Use dummy linker for '*-elf' systems.
Date: Mon, 15 May 2023 14:55:31 +0300
[Message part 1 (text/plain, inline)]
Looks good to me!

On Mon, May 15, 2023 at 06:16:00PM +0800, iyzsong <at> envs.net wrote:
> From: 宋文武 <iyzsong <at> member.fsf.org>
> 
> * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Return "no-ld.so" for
> systems with a "-elf" suffix.
> ---
>  gnu/packages/bootstrap.scm | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index 9a46f97c81..5f6a3acc83 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -325,14 +325,11 @@ (define* (glibc-dynamic-linker
>  
>       ;; 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")
> +     ((string-suffix? "-elf" system) "no-ld.so")
>  
>       (else (error "dynamic linker name not known for this system"
>                    system)))))
> 
> base-commit: 79e9a70c94728272386c7e023a93aa33ebd27d34
> -- 
> 2.40.1
> 

-- 
Efraim Flashner   <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]

Reply sent to 宋文武 <iyzsong <at> envs.net>:
You have taken responsibility. (Mon, 15 May 2023 13:34:02 GMT) Full text and rfc822 format available.

Notification sent to iyzsong <at> envs.net:
bug acknowledged by developer. (Mon, 15 May 2023 13:34:02 GMT) Full text and rfc822 format available.

Message #28 received at 63341-done <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 63341-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Use dummy linker for '*-elf' systems.
Date: Mon, 15 May 2023 21:33:01 +0800
Efraim Flashner <efraim <at> flashner.co.il> writes:

> Looks good to me!

Pushed, thank you for review!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 13 Jun 2023 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.