diff mbox series

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

Message ID 07dcfc64-86c2-df79-9bf9-bf87b2568267@free.fr
State Accepted
Headers show
Series [bug#38459] gnu: (cross-gcc-arguments|gcc-boot0): Enable 128 bit long double for POWER9. | expand

Commit Message

dftxbs3e Dec. 7, 2019, 7:28 p.m. UTC
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
>
>
>

Comments

ashish.is--- via Guix-patches" via Dec. 11, 2019, 12:04 a.m. UTC | #1
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
diff mbox series

Patch

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