unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
@ 2023-05-07  1:31 iyzsong--- via Guix-patches via
  2023-05-07  8:43 ` Efraim Flashner
  2023-05-15 10:16 ` [bug#63341] [PATCH v2] gnu: Use dummy linker for '*-elf' systems iyzsong--- via Guix-patches via
  0 siblings, 2 replies; 7+ messages in thread
From: iyzsong--- via Guix-patches via @ 2023-05-07  1:31 UTC (permalink / raw)
  To: 63341; +Cc: 宋文武

From: 宋文武 <iyzsong@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





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
  2023-05-07  1:31 [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf iyzsong--- via Guix-patches via
@ 2023-05-07  8:43 ` Efraim Flashner
  2023-05-07 13:22   ` 宋文武 via Guix-patches via
  2023-05-15 10:16 ` [bug#63341] [PATCH v2] gnu: Use dummy linker for '*-elf' systems iyzsong--- via Guix-patches via
  1 sibling, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2023-05-07  8:43 UTC (permalink / raw)
  To: iyzsong; +Cc: 63341, 宋文武

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

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@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@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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
  2023-05-07  8:43 ` Efraim Flashner
@ 2023-05-07 13:22   ` 宋文武 via Guix-patches via
  2023-05-09 15:55     ` Efraim Flashner
  0 siblings, 1 reply; 7+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-05-07 13:22 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 63341, 宋文武

[-- Attachment #1: Type: text/plain, Size: 416 bytes --]

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.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Use-dummy-linker-for-systems-without-a-linux-or-.patch --]
[-- Type: text/x-patch, Size: 1869 bytes --]

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"))))
 
 \f
 ;;;

base-commit: 7612610c44f16fc8f2ff395d9a2d58101a7356aa
-- 
2.39.2


[-- Attachment #3: Type: text/plain, Size: 53 bytes --]



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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
  2023-05-07 13:22   ` 宋文武 via Guix-patches via
@ 2023-05-09 15:55     ` Efraim Flashner
  2023-05-15 10:16       ` 宋文武 via Guix-patches via
  0 siblings, 1 reply; 7+ messages in thread
From: Efraim Flashner @ 2023-05-09 15:55 UTC (permalink / raw)
  To: 宋文武; +Cc: 63341, 宋文武

[-- Attachment #1: Type: text/plain, Size: 3055 bytes --]

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"))))
>  
>  \f
>  ;;;
> 
> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#63341] [PATCH v2] gnu: Use dummy linker for '*-elf' systems.
  2023-05-07  1:31 [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf iyzsong--- via Guix-patches via
  2023-05-07  8:43 ` Efraim Flashner
@ 2023-05-15 10:16 ` iyzsong--- via Guix-patches via
       [not found]   ` <ZGIds6AAo1Vcmx8w@3900XT>
  1 sibling, 1 reply; 7+ messages in thread
From: iyzsong--- via Guix-patches via @ 2023-05-15 10:16 UTC (permalink / raw)
  To: 63341; +Cc: 宋文武, Efraim Flashner

From: 宋文武 <iyzsong@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





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf.
  2023-05-09 15:55     ` Efraim Flashner
@ 2023-05-15 10:16       ` 宋文武 via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-05-15 10:16 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 63341

Efraim Flashner <efraim@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.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#63341: [PATCH v2] gnu: Use dummy linker for '*-elf' systems.
       [not found]   ` <ZGIds6AAo1Vcmx8w@3900XT>
@ 2023-05-15 13:33     ` 宋文武 via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-05-15 13:33 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 63341-done

Efraim Flashner <efraim@flashner.co.il> writes:

> Looks good to me!

Pushed, thank you for review!




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-15 13:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-07  1:31 [bug#63341] [PATCH] gnu: Add dummy linker for riscv64-elf iyzsong--- via Guix-patches via
2023-05-07  8:43 ` Efraim Flashner
2023-05-07 13:22   ` 宋文武 via Guix-patches via
2023-05-09 15:55     ` Efraim Flashner
2023-05-15 10:16       ` 宋文武 via Guix-patches via
2023-05-15 10:16 ` [bug#63341] [PATCH v2] gnu: Use dummy linker for '*-elf' systems iyzsong--- via Guix-patches via
     [not found]   ` <ZGIds6AAo1Vcmx8w@3900XT>
2023-05-15 13:33     ` bug#63341: " 宋文武 via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).