]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix build with GCC 13 _FloatN, _FloatNx built-in functions
authorJoseph Myers <joseph@codesourcery.com>
Mon, 31 Oct 2022 23:20:08 +0000 (23:20 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 31 Oct 2022 23:20:08 +0000 (23:20 +0000)
commitf66780ba46805760a328f01967836416b06c93ca
treeb8a849cc06de88841f75424706ab0ebdd3423b48
parentbbff275fb1b16f5b7dd95933bde6e1e496414dbf
Fix build with GCC 13 _FloatN, _FloatNx built-in functions

GCC 13 has added more _FloatN and _FloatNx versions of existing
<math.h> and <complex.h> built-in functions, for use in libstdc++-v3.

This breaks the glibc build because of how those functions are defined
as aliases to functions with the same ABI but different types.  Add
appropriate -fno-builtin-* options for compiling relevant files, as
already done for the case of long double functions aliasing double
ones and based on the list of files used there.

I fixed some mistakes in that list of double files that I noticed
while implementing this fix, but there may well be more such
(harmless) cases, in this list or the new one (files that don't
actually exist or don't define the named functions as aliases so don't
need the options).  I did try to exclude cases where glibc doesn't
define certain functions for _FloatN or _FloatNx types at all from the
new uses of -fno-builtin-* options.  As with the options for double
files (see the commit message for commit
49348beafe9ba150c9bd48595b3f372299bddbb0, "Fix build with GCC 10 when
long double = double."), it's deliberate that the options are used
even if GCC currently doesn't have a built-in version of a given
functions, so providing some level of future-proofing against more
such built-in functions being added in future.

Tested with build-many-glibcs.py for aarch64-linux-gnu
powerpc-linux-gnu powerpc64le-linux-gnu x86_64-linux-gnu (compilers
and glibcs builds) with GCC mainline.
math/Makefile
sysdeps/ieee754/float128/Makefile
sysdeps/ieee754/ldbl-128/Makefile
sysdeps/ieee754/ldbl-96/Makefile
sysdeps/powerpc/powerpc32/fpu/Makefile
sysdeps/powerpc/powerpc64/fpu/Makefile
sysdeps/powerpc/powerpc64/le/fpu/multiarch/Makefile
sysdeps/x86_64/x32/Makefile