Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] Add support for ppc64le

From: Breno Leitao <brenohl_at_br.ibm.com>
Date: Fri, 20 Jan 2017 11:30:56 -0200

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.

> http://wiki.musl-libc.org/wiki/Supported_Platforms
>
> powerpc (needs gcc built with --enable-secureplt --with-long-double-64,
> and -Wl,--secure-plt to link dynamic binaries.)

I am *not* using enable-secureplt, and I didn't saw any problem. it seems
that I need it, tho. Not sure with it didn't break. I will take a look depeer
at building musl with secure-plt.

Thank you!



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Jan 20 2017 - 11:30:56 GMT