[RFC v2] Add [v]aprintf(3)
Alejandro Colomar
alx@kernel.org
Tue Mar 17 21:10:01 GMT 2026
Hi Joseph,
On 2026-03-17T20:52:50+0000, Joseph Myers wrote:
> On Tue, 17 Mar 2026, Alejandro Colomar wrote:
>
> > > There is also the question if we need to nldbl variants for some ABIs
> > > (I don't recall in details the issue).
> >
> > I don't know what ldbl and nldbl are, so I can't tell.
>
> On platforms with two long double formats (-mlong-double-64 and
> -mlong-double-128), all printf-like functions should have two versions,
> with __nldbl_* ones for the -mlong-double-64 case (with associated symbol
> versions in sysdeps/ieee754/ldbl-opt/Versions and tests enabled through
> sysdeps/ieee754/ldbl-opt/Makefile, and libio/bits/stdio-ldbl.h having a
> call to an appropriate redirection macro). (There are also wrappers under
> the unprefixed names for libnldbl_nonshared.a, which I think is intended
> for compilers lacking asm redirection support, and probably doesn't work
> very well.)
>
> On powerpc64le, there are three long double formats, so there are also
> __*ieee128 versions using binary128 long double, versions in
> sysdeps/ieee754/ldbl-128ibm-compat/Versions, tests enabled in
> sysdeps/ieee754/ldbl-128ibm-compat/Makefile.
>
> All symbol versions also require corresponding updates to *.abilist. For
> simple cases of a function at the same version on all supported platforms,
> "make update-all-abi" suffices, but for printf-like functions, platforms
> with __nldbl_* need those added to the relevant .abilist files, and
> likewise for __*ieee128 on powerpc64le.
>
> The effect is that printf-like functions are some of the hardest to add to
> glibc
Ouch; indeed. I'll first work on the documentation and basic tests, and
I'll probably need a lot of help after that for this part. Thanks!
Cheers,
Alex
> and testing on powerpc64le is essential (and testing with
> build-many-glibcs.py may be useful as well to make sure that all supported
> ABIs build and pass the compilation parts of the testsuite, but takes a
> lot of resources).
>
> > > and the
> > > fortification wrapper.
> >
> > Okay; I'll try this too.
>
> Of course where functions have fortification wrappers, those need all the
> same long double variants as well.
>
> --
> Joseph S. Myers
> josmyers@redhat.com
>
--
<https://www.alejandro-colomar.es>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260317/f39716ac/attachment-0001.sig>
More information about the Libc-alpha
mailing list