[PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.

  • Done
  • quality assurance status badge
Details
3 participants
  • dftxbs3e
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
dftxbs3e
Severity
normal
D
D
dftxbs3e wrote on 2 Dec 2019 20:20
(address . guix-patches@gnu.org)
9d5aee30-1cfe-434b-f191-3bbd06caa319@free.fr
Hello,

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

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

dftxbs3e
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(+)

Toggle diff (16 lines)
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
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(+)

Toggle diff (16 lines)
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
T
T
Tobias Geerinckx-Rice wrote on 2 Dec 2019 20:57
(address . 38459@debbugs.gnu.org)
87h82its9y.fsf@nckx
dftxbs3e,

dftxbs3e ???
Toggle quote (4 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl3lbJkACgkQ2Imw8BjF
STxwORAAileDBPaaiYhdFu37sCcBQlE7Ays+tgR2BL3DnQh0qdUYFJgciXNQTpFK
TbJ1TwwsvU7chjkrhQCkBzNvaKA7ZLMst0l6XblTTtl1qLR+ylR8Qti9pCRrg763
vp1Ss3MQqgYMLLjziTyx+u4L+xwiXwjx4wEPhixou6clCRqUyvERs89AJM5//e2l
G3ywD563U1zajJbSuEk2eU6GKdYd9w/W/WvBbxRCetPXfcrjjRODRPaINnlt0K6z
T3keriUnJP67LKK7dmqz5r0lfllSZ6n0GwJe+9L/QraaY5blQgpy6GGWJBNmWZ1r
ippo8UW/xBZ++d0fAjL8cNjuTbxaswHFQbCJalWZ78tsfyuHOcEHgZoNkhhuNCbo
v3wYBT6m3b2Qxrjxa2DA81O8oucuODwIw9q+4cMbeEvIuORRhR23bUWeiOlIuRrT
N6qQLDupnvO2u3aNXB/qW31VALWIERdLtBb7O7bifzn5ICrAt1RJEjx9CLtRMirn
a7V3t2V32NnoLkTGdgOd9yIZZKNIMUF0kqTw2XEhqBlU3tD1Mt2qHRc6T4R8l0tw
0gSqeO3hzzRavnX8dP0RByuY88LVBTDDNNXwcBYJl4IcSRr5t82evYtyyoEvw5up
7ZEhvRS5JgXaG141hMwurpIH8pmkUrM+ewiNmRME+JsFghLevSU=
=aEer
-----END PGP SIGNATURE-----

D
D
dftxbs3e wrote on 2 Dec 2019 21:03
(address . guix-patches@gnu.org)
0e9bb696-0165-82c8-799b-58ae72e382cc@free.fr
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:
Toggle quote (17 lines)
> 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
D
D
dftxbs3e wrote on 7 Dec 2019 20:28
(address . guix-patches@gnu.org)
07dcfc64-86c2-df79-9bf9-bf87b2568267@free.fr
I could figure it out myself.

Attached new patches!

On 12/2/19 9:03 PM, dftxbs3e wrote:
Toggle quote (27 lines)
> 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
>
>
>
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(+)

Toggle diff (18 lines)
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
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(+)

Toggle diff (18 lines)
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
T
T
Tobias Geerinckx-Rice wrote on 11 Dec 2019 01:04
(name . dftxbs3e)(address . dftxbs3e@free.fr)(address . 38459@debbugs.gnu.org)
8736drk9ui.fsf@nckx
dftxbs3e,

dftxbs3e ???
Toggle quote (4 lines)
> I could figure it out myself.
>
> Attached new patches!

Thanks!

Toggle quote (1 lines)
> + ,@(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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl3wMnIACgkQ2Imw8BjF
STzuaw//dJPG2dUvn6GqdYniR+KYCfKLwwTUlAAmIzCLCdXaVQ7clI7xrs+8Nllw
DHLNmPo29ci54G8SJHdTrcp9+8a0eemSECZlAFYQCa8uMk1+cJKstv5eP71Ryu4V
Cc24BCLwkfs2Msiq1JfnxXKdBRVGLDRSlUjN2+YswXqN4OnYI/qdYDdfsxHQ4ZE/
MXCsLurBJcb3JOtypBNZP8O0HoBASRYfV7L0HGp+AS7hYIpB5MnoWoKG0ozel1wG
bG7UsF6Co7zZcSJ3PKOI0eyStjqH+q0wd0sjvxFdllKE5MMAEkXXJ2La6VdQcIuI
DzoyztY+Sn3TepWjjkp82EP286TvAWc/FUict87W8gvuGQ9ISjzbt+iiOJiTIIXf
7O8P/F/LCfCHvWv63xSdD0uXcjYsDqBpP2j/7hO9JD2XiHFyRnkvIasJoDjN/OWM
Ri6NsFrHO5SpukZmhVdWt3/KgHX3EXPr4epiOG7VCJpH+e7UO6qv9tOk6ZBwuCh6
bhhxpScPnT0OHb5DWfJUjPqGnSuxUVOUQj9Qof7uACl1DA/ipm5Rp11Nmqt93q0b
K2oGAnWKcbGYG2HUSk4XEjl9IPo6z/dWPkHYqaj4vPGkTImw7kWxfO+SvjkwB0mA
xM8XV51O8PZsEgVYrZK+FEKt1u1BcgFU9AYdE5hZVIVJT+amR3w=
=PgV0
-----END PGP SIGNATURE-----

D
D
dftxbs3e wrote on 21 Nov 2020 00:21
[PATCH] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9.
(address . 38459@debbugs.gnu.org)
eb2b3e9047e5696c2a603be940e2830c9f450773.camel@free.fr
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.
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(+)

Toggle diff (18 lines)
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
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(+)

Toggle diff (18 lines)
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
D
D
dftxbs3e wrote on 21 Nov 2020 00:30
(address . 38459@debbugs.gnu.org)
8ddebd811dd8c6c13122ad867122ea6073269223.camel@free.fr
Note: this can be applied on master by now since core-updates was
merged into it since then.
L
L
Ludovic Courtès wrote on 26 Nov 2020 23:28
(name . dftxbs3e)(address . dftxbs3e@free.fr)(address . 38459-done@debbugs.gnu.org)
87pn3zzrb2.fsf@gnu.org
Hi,

dftxbs3e <dftxbs3e@free.fr> skribis:

Toggle quote (8 lines)
>>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 +++++

[...]

Toggle quote (9 lines)
>>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’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 38459@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 38459
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch