Re: [alpine-aports] [PATCH] Add support for ppc64le
On 01/20/2017 11:42 AM, Timo Teras wrote:
> On Fri, 20 Jan 2017 11:30:56 -0200
> Breno Leitao <brenohl_at_br.ibm.com> wrote:
>> Hi Timo,
>> On 01/20/2017 10:35 AM, Timo Teras wrote:
>>> On Fri, 20 Jan 2017 14:25:10 +0200
>>> Timo Teras <timo.teras_at_iki.fi> wrote:
>>>> On Tue, 17 Jan 2017 14:30:31 -0200
>>>> Breno Leitao <brenohl_at_br.ibm.com> wrote:
>>>>> This is a patch that adds support for ppc64le platform.
>>>>> Currently, musl fails to build with long double as 128-bits,
>>>>> because POWER does not implement IEEE long double but IBM long
>>>>> double which causes the following error:
>>>>> unsupported long double type musl
>>>>> This patch just turns "long double" into "double" for ppc64le.
>>>> Should this be in gcc default flags instead? I suspect almost
>>>> nothing will work with 128-bit double if c-library does not
>>>> support it. And assume this affects ABI too?
>> GCC on Powerpc has a native support for long double (128-bits float).
>> The support is not using the traditional IEEE 754R, but a very
>> specific format called "IBM extended double".
>> This is transparent to most of the open source software. The only
>> problem I see recently is related to musl that requires long double
>> to be IEEE complaint.
>> If we set the --with-long-double-64 as a default gcc option, we will
>> kill *all* long double operations, i.e long double will be equal to
>> double. I do not think that killing all the quad float operation is
>> worth just to become IEEE 754R complaint.
>> That is why I proposed to do this change only where it is required,
>> and the only package to complain about it (long double not being
>> IEEE) seems to be musl.
>> POWER9 will add support for IEEE long double together with IBM
>> extended double.
> But if you compile musl different from rest of system, then printf and
> all C-library provided function operating on a double will not work for
> the caller, due to assuming different double types. I'm pretty sure
> you'd have a broken system in this case.
> The only case where it makes sense is that the software using 'double'
> is not calling any libc functions. But this is rare case. If there's
> such software they probably setup CFLAGS anyway properly for this with
> -ffreestanding etc.
> I think ultimately the thing is that musl does not (yet?) support
> 128-bit double on powerpc. You might want to ask on #musl or musl
> mailing list about this.
> But for the time being we should just enable gcc's
> --with-long-double-64 and live with this limitation.
Yes, I agree with you. I just update the Pull Request with this new change
and linked to this discussion:
Received on Fri Jan 20 2017 - 13:54:03 GMT