unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
@ 2019-12-02 19:20 dftxbs3e
  2019-12-02 19:57 ` Tobias Geerinckx-Rice via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: dftxbs3e @ 2019-12-02 19:20 UTC (permalink / raw)
  To: 38459

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

Hello,

This is to be applied against core-updates and fixes:

$ guix build --target=powerpc64le-linux-gnu bootstrap-tarballs

dftxbs3e


[-- Attachment #2: 0002-gnu-cross-gcc-arguments-Enable-128-bit-long-double-f.patch --]
[-- Type: text/x-patch, Size: 1083 bytes --]

From dcbd3a812038fbc1a229836a850f529aa35b45c8 Mon Sep 17 00:00:00 2001
From: dftxbs3e <dftxbs3e@free.fr>
Date: Mon, 2 Dec 2019 20:02:24 +0100
Subject: [PATCH 2/2] gnu: cross-gcc-arguments: Enable 128 bit long double for
 POWER9.

---
 gnu/packages/cross-base.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 13237fb8a8..e60a8ed03a 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -150,6 +150,9 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
                                "--disable-decimal-float" ;would need libc
                                "--disable-libcilkrts"
 
+                              ;; On POWER9 (little endian) glibc needs the 128 bit long double type.
+                               "--with-long-double-128"
+
                                ;; When target is any OS other than 'none' these
                                ;; libraries will fail if there is no libc
                                ;; present. See
-- 
2.21.0


[-- Attachment #3: 0001-gnu-gcc-boot0-Enable-128-bit-long-double-for-POWER9.patch --]
[-- Type: text/x-patch, Size: 989 bytes --]

From 87b30dcb90572bd46c8eb087efe7d75db362f59b Mon Sep 17 00:00:00 2001
From: dftxbs3e <dftxbs3e@free.fr>
Date: Mon, 2 Dec 2019 19:58:19 +0100
Subject: [PATCH 1/2] gnu: gcc-boot0: Enable 128 bit long double for POWER9.

---
 gnu/packages/commencement.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 8bf7704598..bfdba4dbd2 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1576,6 +1576,9 @@ exec " gcc "/bin/" program
                            "--disable-shared"
                            "--enable-languages=c,c++"
 
+                           ;; On POWER9 (little endian) glibc needs the 128 bit long double type.
+                           "--with-long-double-128"
+
                            ;; libstdc++ cannot be built at this stage
                            ;; ("Link tests are not allowed after
                            ;; GCC_NO_EXECUTABLES.").
-- 
2.21.0


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

* [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
  2019-12-02 19:20 [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9 dftxbs3e
@ 2019-12-02 19:57 ` Tobias Geerinckx-Rice via Guix-patches via
  2019-12-02 20:03   ` dftxbs3e
  2020-11-20 23:21 ` dftxbs3e
  2020-11-20 23:30 ` [bug#38459] " dftxbs3e
  2 siblings, 1 reply; 8+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2019-12-02 19:57 UTC (permalink / raw)
  To: 38459

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

dftxbs3e,

dftxbs3e 写道:
> This is to be applied against core-updates and fixes:
>
> $ guix build --target=powerpc64le-linux-gnu bootstrap-tarballs

Thanks for sending this in!  I'll be sure to merge it if no one 
else has objections.

I'm really not familiar with this part of Guix, though.  I'd 
naively expect this to be guarded with an (if …) so it only 
applies to POWER.  (Why) is that not possible or desirable?

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
  2019-12-02 19:57 ` Tobias Geerinckx-Rice via Guix-patches via
@ 2019-12-02 20:03   ` dftxbs3e
  2019-12-07 19:28     ` dftxbs3e
  0 siblings, 1 reply; 8+ messages in thread
From: dftxbs3e @ 2019-12-02 20:03 UTC (permalink / raw)
  To: 38459

Yes, it should certainly be guarded by an if to avoid breaking other 
platforms, even if it shouldnt hurt much.

Issue is I do not know Scheme enough to figure out the syntax for an 
inline if like that. So I would appreciate if you could help me on that?

On 12/2/19 8:57 PM, Tobias Geerinckx-Rice via Guix-patches via wrote:
> dftxbs3e,
>
> dftxbs3e 写道:
>> This is to be applied against core-updates and fixes:
>>
>> $ guix build --target=powerpc64le-linux-gnu bootstrap-tarballs
>
> Thanks for sending this in!  I'll be sure to merge it if no one else 
> has objections.
>
> I'm really not familiar with this part of Guix, though.  I'd naively 
> expect this to be guarded with an (if …) so it only applies to POWER.  
> (Why) is that not possible or desirable?
>
> Kind regards,
>
> T G-R

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

* [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
  2019-12-02 20:03   ` dftxbs3e
@ 2019-12-07 19:28     ` dftxbs3e
  2019-12-11  0:04       ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 8+ messages in thread
From: dftxbs3e @ 2019-12-07 19:28 UTC (permalink / raw)
  To: 38459

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

I could figure it out myself.

Attached new patches!

On 12/2/19 9:03 PM, dftxbs3e wrote:
> Yes, it should certainly be guarded by an if to avoid breaking other 
> platforms, even if it shouldnt hurt much.
>
> Issue is I do not know Scheme enough to figure out the syntax for an 
> inline if like that. So I would appreciate if you could help me on that?
>
> On 12/2/19 8:57 PM, Tobias Geerinckx-Rice via Guix-patches via wrote:
>> dftxbs3e,
>>
>> dftxbs3e 写道:
>>> This is to be applied against core-updates and fixes:
>>>
>>> $ guix build --target=powerpc64le-linux-gnu bootstrap-tarballs
>>
>> Thanks for sending this in!  I'll be sure to merge it if no one else 
>> has objections.
>>
>> I'm really not familiar with this part of Guix, though.  I'd naively 
>> expect this to be guarded with an (if …) so it only applies to 
>> POWER.  (Why) is that not possible or desirable?
>>
>> Kind regards,
>>
>> T G-R
>
>
>

[-- Attachment #2: 0002-gnu-cross-gcc-arguments-Enable-128-bit-long-double-f.patch --]
[-- Type: text/x-patch, Size: 1216 bytes --]

From 0628808608a0b0851de913a88d626234358100c5 Mon Sep 17 00:00:00 2001
From: dftxbs3e <dftxbs3e@free.fr>
Date: Sat, 7 Dec 2019 20:27:12 +0100
Subject: [PATCH 2/2] gnu: cross-gcc-arguments: Enable 128 bit long double for
 POWER9.

---
 gnu/packages/cross-base.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 13237fb8a8..18dc1f592b 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -150,6 +150,11 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
                                "--disable-decimal-float" ;would need libc
                                "--disable-libcilkrts"
 
+                              ,@(if (equal? "powerpc64le-linux-gnu" target)
+                                   ;; On POWER9 (little endian) glibc needs the 128 bit long double type.
+                                   '("--with-long-double-128")
+                                   '())
+
                                ;; When target is any OS other than 'none' these
                                ;; libraries will fail if there is no libc
                                ;; present. See
-- 
2.21.0


[-- Attachment #3: 0001-gnu-gcc-boot0-Enable-128-bit-long-double-for-POWER9.patch --]
[-- Type: text/x-patch, Size: 1120 bytes --]

From 66bcaaebe1761499a60518dc83975006aa30b58f Mon Sep 17 00:00:00 2001
From: dftxbs3e <dftxbs3e@free.fr>
Date: Sat, 7 Dec 2019 20:26:51 +0100
Subject: [PATCH 1/2] gnu: gcc-boot0: Enable 128 bit long double for POWER9.

---
 gnu/packages/commencement.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 8bf7704598..a466a383bd 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1576,6 +1576,11 @@ exec " gcc "/bin/" program
                            "--disable-shared"
                            "--enable-languages=c,c++"
 
+                           ,@(if (equal? "powerpc64le-linux-gnu" boot-triplet)
+                               ;; On POWER9 (little endian) glibc needs the 128 bit long double type.
+                               '("--with-long-double-128")
+                               '())
+
                            ;; libstdc++ cannot be built at this stage
                            ;; ("Link tests are not allowed after
                            ;; GCC_NO_EXECUTABLES.").
-- 
2.21.0


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

* [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
  2019-12-07 19:28     ` dftxbs3e
@ 2019-12-11  0:04       ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 0 replies; 8+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2019-12-11  0:04 UTC (permalink / raw)
  To: dftxbs3e; +Cc: 38459

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

dftxbs3e,

dftxbs3e 写道:
> I could figure it out myself.
>
> Attached new patches!

Thanks!

> +   ,@(if (equal? "powerpc64le-linux-gnu" boot-triplet)
                                            ^^^^^^^^^^^^

This doesn't look right to my tired eyes.

BOOT-TRIPLET isn't a string, but a procedure that returns a 
string.  As I see it, this comparison will always be false, on any 
platform, and the "--with-long-double-128" option will never be 
used.

How did you tests this?  The other patch looks correct: perhaps 
you were somehow testing only its effects?

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
  2019-12-02 19:20 [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9 dftxbs3e
  2019-12-02 19:57 ` Tobias Geerinckx-Rice via Guix-patches via
@ 2020-11-20 23:21 ` dftxbs3e
  2020-11-26 22:28   ` bug#38459: " Ludovic Courtès
  2020-11-20 23:30 ` [bug#38459] " dftxbs3e
  2 siblings, 1 reply; 8+ messages in thread
From: dftxbs3e @ 2020-11-20 23:21 UTC (permalink / raw)
  To: 38459

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

You are right, I can't test the commencement.scm patch yet because
bootstrap-tarballs are not built and included in GNU Guix yet. This
patch is intended to allow them to build.

Attached new patches.

[-- Attachment #2: 0001-gnu-gcc-boot0-Enable-128-bit-long-double-for-POWER9.patch --]
[-- Type: text/x-patch, Size: 1123 bytes --]

From 66bcaaebe1761499a60518dc83975006aa30b58f Mon Sep 17 00:00:00 2001
From: dftxbs3e <dftxbs3e@free.fr>
Date: Sat, 7 Dec 2019 20:26:51 +0100
Subject: [PATCH 1/2] gnu: gcc-boot0: Enable 128 bit long double for POWER9.

---
 gnu/packages/commencement.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 8bf7704598..a466a383bd 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1576,6 +1576,11 @@ exec " gcc "/bin/" program
                            "--disable-shared"
                            "--enable-languages=c,c++"
 
+                           ,@(if (equal? "powerpc64le-linux-gnu" (boot-triplet))
+                               ;; On POWER9 (little endian) glibc needs the 128 bit long double type.
+                               '("--with-long-double-128")
+                               '())
+
                            ;; libstdc++ cannot be built at this stage
                            ;; ("Link tests are not allowed after
                            ;; GCC_NO_EXECUTABLES.").
-- 
2.21.0



[-- Attachment #3: 0002-gnu-cross-gcc-arguments-Enable-128-bit-long-double-f.patch --]
[-- Type: text/x-patch, Size: 1216 bytes --]

From 0628808608a0b0851de913a88d626234358100c5 Mon Sep 17 00:00:00 2001
From: dftxbs3e <dftxbs3e@free.fr>
Date: Sat, 7 Dec 2019 20:27:12 +0100
Subject: [PATCH 2/2] gnu: cross-gcc-arguments: Enable 128 bit long double for
 POWER9.

---
 gnu/packages/cross-base.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 13237fb8a8..18dc1f592b 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -150,6 +150,11 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
                                "--disable-decimal-float" ;would need libc
                                "--disable-libcilkrts"
 
+                              ,@(if (equal? "powerpc64le-linux-gnu" target)
+                                   ;; On POWER9 (little endian) glibc needs the 128 bit long double type.
+                                   '("--with-long-double-128")
+                                   '())
+
                                ;; When target is any OS other than 'none' these
                                ;; libraries will fail if there is no libc
                                ;; present. See
-- 
2.21.0


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

* [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
  2019-12-02 19:20 [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9 dftxbs3e
  2019-12-02 19:57 ` Tobias Geerinckx-Rice via Guix-patches via
  2020-11-20 23:21 ` dftxbs3e
@ 2020-11-20 23:30 ` dftxbs3e
  2 siblings, 0 replies; 8+ messages in thread
From: dftxbs3e @ 2020-11-20 23:30 UTC (permalink / raw)
  To: 38459

Note: this can be applied on master by now since core-updates was
merged into it since then.





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

* bug#38459: [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
  2020-11-20 23:21 ` dftxbs3e
@ 2020-11-26 22:28   ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2020-11-26 22:28 UTC (permalink / raw)
  To: dftxbs3e; +Cc: 38459-done

Hi,

dftxbs3e <dftxbs3e@free.fr> skribis:

>>From 66bcaaebe1761499a60518dc83975006aa30b58f Mon Sep 17 00:00:00 2001
> From: dftxbs3e <dftxbs3e@free.fr>
> Date: Sat, 7 Dec 2019 20:26:51 +0100
> Subject: [PATCH 1/2] gnu: gcc-boot0: Enable 128 bit long double for POWER9.
>
> ---
>  gnu/packages/commencement.scm | 5 +++++

[...]

>>From 0628808608a0b0851de913a88d626234358100c5 Mon Sep 17 00:00:00 2001
> From: dftxbs3e <dftxbs3e@free.fr>
> Date: Sat, 7 Dec 2019 20:27:12 +0100
> Subject: [PATCH 2/2] gnu: cross-gcc-arguments: Enable 128 bit long double for
>  POWER9.
>
> ---
>  gnu/packages/cross-base.scm | 5 +++++

I’ve applied both as a single commit with a commit message that follows
our conventions.  At last.  :-)

Thanks!

Ludo’.




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

end of thread, other threads:[~2020-11-26 22:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-02 19:20 [bug#38459] [PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9 dftxbs3e
2019-12-02 19:57 ` Tobias Geerinckx-Rice via Guix-patches via
2019-12-02 20:03   ` dftxbs3e
2019-12-07 19:28     ` dftxbs3e
2019-12-11  0:04       ` Tobias Geerinckx-Rice via Guix-patches via
2020-11-20 23:21 ` dftxbs3e
2020-11-26 22:28   ` bug#38459: " Ludovic Courtès
2020-11-20 23:30 ` [bug#38459] " dftxbs3e

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