From patchwork Sun Mar 11 18:25:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 26279 Received: (qmail 60845 invoked by alias); 11 Mar 2018 18:25:29 -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 60815 invoked by uid 89); 11 Mar 2018 18:25:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=intricacies, HContent-Transfer-Encoding:8bit X-HELO: mailbackend.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Cc: law@redhat.com, joseph@codesourcery.com Subject: [PATCH] nldbl-compat.c: Include math.h before nldbl-compat.h. Date: Sun, 11 Mar 2018 14:25:23 -0400 Message-Id: <20180311182523.25975-1-zackw@panix.com> MIME-Version: 1.0 Jeff Law noticed that native PowerPC builds were broken by my having made math_ldbl_opt.h not include math.h. nldbl-compat.c formerly got math.h via libioP.h and math_ldbl_opt.h, *without* __NO_LONG_DOUBLE_MATH; after my change it got it via nldbl-compat.h *with* __NO_LONG_DOUBLE_MATH, but __NO_LONG_DOUBLE_MATH mode is forbidden on hosts that define __HAVE_DISTINCT_FLOAT128, so the build breaks. I don't know why this didn't come up in a build-many-glibcs cycle. I pushed this as a quick fix, but there's a deeper problem: presumably nldbl-compat.h defines __NO_LONG_DOUBLE_MATH for a reason, but if we can't use __NO_LONG_DOUBLE_MATH on any architecture that supports _Float128, then nldbl-compat.h needs to find some other way to achieve its goal. Or maybe it's vestigial and we could just stop doing it? Do we still need __NO_LONG_DOUBLE_MATH at all? I leave these questions to people more versed in the intricacies of long double. * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Include math.h before nldbl-compat.h. --- sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c index bf54090d4f..ffb5fabebe 100644 --- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c +++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include