|
From: | Paul E Murphy |
Subject: | Re: [PATCH] Merge glibc ieee128 ldbl redirect support into cdefs.h |
Date: | Mon, 4 Jan 2021 09:39:19 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
On 1/1/21 1:49 PM, Bruno Haible wrote:
Hi, Paul Murphy wrote in <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00106.html>:While trying to build gdb with ldbl == ieee128 on ppc64le, we found out gnulib's copy of cdefs.h needs to be synchronized with upstream glibc. The only notable divergence is to ensure __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is always defined as this macro is fairly recent.Why would this be needed? Nothing in Gnulib uses this macro. The cdefs.h of Gnulib is meant to be a minimal replacement (you can also call it a "mock") of the one in Glibc. Can you show the error message you got when compiling gdb, and how you traced it back to a Gnulib issue?
This was encountered when building IBM's advance toolchain (or sufficiently new GCC) with the -mabi=ieeelongdouble option, and glibc 2.32 or newer.
This can be reproduced by building Tulio's branch of AT with IEEE128 enabled. https://github.com/tuliom/advance-toolchain/tree/ldbl-ieee128
We ran into the following:In file included from /home/tuliom/opt/at-next-15.0-0-alpha/include/stdio.h:871,
from ./stdio.h:43,from /home/tuliom/tmp/at-build-tray/at15.0-0-alpha.redhat-8_ppc64le_ppc64le/sources
/gdb/gnulib/import/tempname.h:23,from /home/tuliom/tmp/at-build-tray/at15.0-0-alpha.redhat-8_ppc64le_ppc64le/sources
/gdb/gnulib/import/tempname.c:20:/home/tuliom/opt/at-next-15.0-0-alpha/include/bits/stdio-ldbl.h: In function ‘__LDBL_REDIR1_DECL’: /home/tuliom/opt/at-next-15.0-0-alpha/include/bits/stdio-ldbl.h:36:1: error: expected declaration specifiers before ‘__LDBL_REDIR1_DECL’
36 | __LDBL_REDIR1_DECL (scanf, __isoc99_scanfieee128) | ^~~~~~~~~~~~~~~~~~The missing macro is provided by glibc's cdefs.h. Thus, the wrong cdefs.h was picked up. I found gnulib provides its own copy which does not provide these. Likewise, I verified applying this patch to AT's gdb. This fixed compilation, and the redirects worked as expected.
[Prev in Thread] | Current Thread | [Next in Thread] |