From patchwork Mon Nov 6 13:26:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 834744 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-86788-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="C20x8HA4"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yVtdX44vqz9s06 for ; Tue, 7 Nov 2017 00:27:12 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=F+EI1T6XSwRTPUkcCJ7pcx53egHtu p0xY4Mp4MmYFu9wgeSY20eWr1kY0d+RfFrZrMswhK8NmSrjXrE8knrXRetF2LuM1 3yvoPefBIjNRqLed17p5jAkzXPRYaNwkfiUt4ZEeanV6lXJ+/Xyu6714veVHQ/Nt 8dVDbnTJQxPpH4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=u14OkNnlSq1eVqyQmYp1UtgCKYs=; b=C20 x8HA4dNiELVKZGiUUhe0vusEnjNSBb8ldEKqWakFnzja3J2/cCDu9UahFgf8MCzT BRhTwXJg7LL/kIIMWsAChvRkwjXsRrkdUSymXhkJKb0PBAC07yY0px5bVgbPNPeq O8BGa2WNgteKXrRpVLUOxLWIszbuRsXQHxLJ2ZX0= Received: (qmail 30723 invoked by alias); 6 Nov 2017 13:27:06 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 30265 invoked by uid 89); 6 Nov 2017 13:27:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:2079 X-HELO: relay1.mentorg.com Date: Mon, 6 Nov 2017 13:26:55 +0000 From: Joseph Myers To: Subject: Do not declare _Float128 support for powerpc64le -mlong-double-64 (bug 22402) [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) The powerpc bits/floatn.h declares _Float128 support to be present when the compiler supports it for powerpc64le. However, in the case where -mlong-double-64 is used, __MATH_TG does not actually support _Float128; it only supports _Float128 in the distinct-long-double case. This shows up as a build failure when building glibc mainline with GCC mainline, given the recently added sanity check in math.h for configurations supported by __MATH_TG, as the compat code for -mlong-double-64 fails to build. However, the bug was logically present before that change (including in 2.26), just less visible. This patch fixes the build failure by declaring _Float128 to be unsupported in that case. (Of course this can't actually stop users calling the type-generic macros with _Float128 arguments with -mlong-double-64, just as they could be called with other unsupported types on other platforms, but perhaps makes it less likely by making all the type-specific _Float128 interfaces invisible in that case.) Tested compilation for powerpc64le with build-many-glibcs.py. Committed. 2017-11-06 Joseph Myers [BZ #22402] * sysdeps/powerpc/bits/floatn.h: Include . [__NO_LONG_DOUBLE_MATH] (__HAVE_FLOAT128): Define to 0. diff --git a/sysdeps/powerpc/bits/floatn.h b/sysdeps/powerpc/bits/floatn.h index 44a9434..a293bfc 100644 --- a/sysdeps/powerpc/bits/floatn.h +++ b/sysdeps/powerpc/bits/floatn.h @@ -20,12 +20,13 @@ #define _BITS_FLOATN_H #include +#include /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc includes corresponding *f128 interfaces for it. */ #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ - && defined __FLOAT128__ + && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH # define __HAVE_FLOAT128 1 #else # define __HAVE_FLOAT128 0