diff options
author | Joseph Myers <joseph@codesourcery.com> | 2022-10-31 23:20:08 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2022-10-31 23:20:08 +0000 |
commit | f66780ba46805760a328f01967836416b06c93ca (patch) | |
tree | b8a849cc06de88841f75424706ab0ebdd3423b48 /sysdeps/x86_64/x32/Makefile | |
parent | bbff275fb1b16f5b7dd95933bde6e1e496414dbf (diff) | |
download | glibc-f66780ba46805760a328f01967836416b06c93ca.tar.gz glibc-f66780ba46805760a328f01967836416b06c93ca.tar.xz glibc-f66780ba46805760a328f01967836416b06c93ca.zip |
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.
Diffstat (limited to 'sysdeps/x86_64/x32/Makefile')
-rw-r--r-- | sysdeps/x86_64/x32/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/x86_64/x32/Makefile b/sysdeps/x86_64/x32/Makefile index 8748956563..31732aa248 100644 --- a/sysdeps/x86_64/x32/Makefile +++ b/sysdeps/x86_64/x32/Makefile @@ -2,7 +2,8 @@ ifeq ($(subdir),math) # Since x32 returns 32-bit long int and 64-bit long long int in the # same 64-bit register, we make the 32b-bit lround an alias of the # 64-bit llround. Add -fno-builtin-lround to silence the compiler. -CFLAGS-s_llround.c += -fno-builtin-lround +CFLAGS-s_llround.c += -fno-builtin-lround -fno-builtin-lroundf32x \ + -fno-builtin-lroundf64 endif ifeq ($(subdir),string) |