mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-15 01:21:06 +00:00
3e5760fcb4
GCC 13 adds support for _FloatN and _FloatNx types in C++, so breaking the installed glibc headers that assume such support is not present. GCC mostly works around this with fixincludes, but that doesn't help for building glibc and its tests (glibc doesn't itself contain C++ code, but there's C++ code built for tests). Update glibc's bits/floatn-common.h and bits/floatn.h headers to handle the GCC 13 support directly. In general the changes match those made by fixincludes, though I think the ones in sysdeps/powerpc/bits/floatn.h, where the header tests __LDBL_MANT_DIG__ == 113 or uses #elif, wouldn't match the existing fixincludes patterns. Some places involving special C++ handling in relation to _FloatN support are not changed. There's no need to change the __HAVE_FLOATN_NOT_TYPEDEF definition (also in a form that wouldn't be matched by the fixincludes fixes) because it's only used in relation to macro definitions using features not supported for C++ (__builtin_types_compatible_p and _Generic). And there's no need to change the inline function overloads for issignaling, iszero and iscanonical in C++ because cases where types have the same format but are no longer compatible types are handled automatically by the C++ overload resolution rules. This patch also does not change the overload handling for iseqsig, and there I think changes *are* needed, beyond those in this patch or made by fixincludes. The way that overload is defined, via a template parameter to a structure type, requires overloads whenever the types are incompatible, even if they have the same format. So I think we need to add overloads with GCC 13 for every supported _FloatN and _FloatNx type, rather than just having one for _Float128 when it has a different ABI to long double as at present (but for older GCC, such overloads must not be defined for types that end up defined as typedefs for another type). Tested with build-many-glibcs.py: compilers build for aarch64-linux-gnu ia64-linux-gnu mips64-linux-gnu powerpc-linux-gnu powerpc64le-linux-gnu x86_64-linux-gnu; glibcs build for aarch64-linux-gnu ia64-linux-gnu i686-linux-gnu mips-linux-gnu mips64-linux-gnu-n32 powerpc-linux-gnu powerpc64le-linux-gnu x86_64-linux-gnu. |
||
---|---|---|
.. | ||
bits | ||
fpu | ||
nofpu | ||
nptl | ||
power4 | ||
power6 | ||
powerpc32 | ||
powerpc64 | ||
sys/platform | ||
abort-instr.h | ||
atomic-machine.h | ||
cpu-features.c | ||
cpu-features.h | ||
dl-lookupcfg.h | ||
dl-procinfo.c | ||
dl-procinfo.h | ||
dl-tls.c | ||
dl-tls.h | ||
dl-tunables.list | ||
elf-initfini.h | ||
ffs.c | ||
fpu_control.h | ||
gccframe.h | ||
hwcapinfo.c | ||
hwcapinfo.h | ||
ifunc-sel.h | ||
jmpbuf-offsets.h | ||
jmpbuf-unwind.h | ||
ldsodefs.h | ||
libc-tls.c | ||
locale-defines.sym | ||
longjmp.c | ||
machine-gmon.h | ||
Makefile | ||
math-tests-snan-cast.h | ||
mod-cache-ppc.c | ||
mod-tlsopt-powerpc.c | ||
mp_clz_tab.c | ||
novmx-longjmp.c | ||
novmx-sigjmp.c | ||
novmxsetjmp.h | ||
preconfigure | ||
preconfigure.ac | ||
rtld-global-offsets.sym | ||
sigjmp.c | ||
sotruss-lib.c | ||
stackinfo.h | ||
sysdep.h | ||
test-arith.c | ||
test-arithf.c | ||
test-get_hwcap-static.c | ||
test-get_hwcap.c | ||
test-gettimebase.c | ||
tst-cache-ppc-static-dlopen.c | ||
tst-cache-ppc-static.c | ||
tst-cache-ppc.c | ||
tst-set_ppr.c | ||
tst-stack-align.h | ||
tst-tlsifunc-static.c | ||
tst-tlsifunc.c | ||
tst-tlsopt-powerpc.c | ||
Versions |