X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by lists.alpinelinux.org (Postfix) with ESMTP id AF7B95C41AA for ; Fri, 20 Jan 2017 13:42:22 +0000 (GMT) Received: by mail-lf0-f67.google.com with SMTP id x1so8701867lff.0 for ; Fri, 20 Jan 2017 05:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rro2xKelgOYffuiT/gmvStyJ56ujvDZbokrF/K6m/nk=; b=ZFPHxrBeXynUckepy3q75FYe1VtQVTBELHNyGApAtiQt6wp12EZ2JNXeDdH9zM7a5Y Csqb5LNC4A0svpDs1krT+HJwizfcuV1eo4KVpH7lefeWFM9VlgHchoXgtuQdf6Xiqc9/ +bbN3fV+XpCgHFEKK4pkirAlOdEaH9oJ5bqQhT2ilM8F1aAAH8Wm40MagKbatqfN7cI3 wj0Vg3hF9+wFlJ7qq2yg00zktHIxFQqHZ7HOir54B0uIGN2HJqAXyXj0JrNOtZam3eCP mG10/Pj0CbRPb3nUut0k+S7Z8cjArJaQOXZdVU3q29JX8UOTyrYnSiNfMFILzoYxrVpD tDKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rro2xKelgOYffuiT/gmvStyJ56ujvDZbokrF/K6m/nk=; b=Eu0lSSsg6MgWRTbr8/MvV1tOuyuVsIc7kJweHpMfyOmeOjZabgyyL2rm+a4bVKPuSl +JVYh3Xum4dmtJ+pdm0PSyO5cugZHY+/M4fm612ZKJJGvcTGXkwra/dCgZ+2l3yK0a9d pzce/1Dm7Xy7/fQm7DPVEdpFuVGduTbNLHIDZ6cqBpFs59nYlAq+CLoYGuG0qOkYlaju XTQNF4HKEe76/qZl8yfrXp4qlL38+BdwMqpMg5ykpmInqZgmqOux0IdaP53By21in5Cp 5lfI1NCetIHdqMzk0wcPZFktV/5+7jdr/jvi/1yTLsJvUNe0bqGHvKjEClaRlH+XUwF0 qrrQ== X-Gm-Message-State: AIkVDXIN8f28txSZHmKwIrSZ6gD9x5ydWGBYWap0OZWZ9X28eoFRwfHvw+M/Hha5gM05Dw== X-Received: by 10.46.7.18 with SMTP id 18mr6560317ljh.62.1484919741811; Fri, 20 Jan 2017 05:42:21 -0800 (PST) Received: from vostro ([2001:1bc8:101:f402:e66f:13ff:fef3:8cd0]) by smtp.gmail.com with ESMTPSA id u12sm3487905lja.19.2017.01.20.05.42.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jan 2017 05:42:21 -0800 (PST) Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= Date: Fri, 20 Jan 2017 15:42:16 +0200 From: Timo Teras To: Breno Leitao Cc: alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] [PATCH] Add support for ppc64le Message-ID: <20170120154216.699bd22d@vostro> In-Reply-To: <68f63acc-b6ad-5370-55a8-a55ea4e8b479@br.ibm.com> References: <1484670631-10385-1-git-send-email-brenohl@br.ibm.com> <20170120142510.7dd61350@vostro> <20170120143532.1aa59d71@vostro> <68f63acc-b6ad-5370-55a8-a55ea4e8b479@br.ibm.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 20 Jan 2017 11:30:56 -0200 Breno Leitao wrote: > Hi Timo, > > On 01/20/2017 10:35 AM, Timo Teras wrote: > > On Fri, 20 Jan 2017 14:25:10 +0200 > > Timo Teras wrote: > > > >> On Tue, 17 Jan 2017 14:30:31 -0200 > >> Breno Leitao 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. /Timo --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---