about summary refs log tree commit diff
path: root/libio/swscanf.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2020-03-17 22:57:42 +0000
committerJoseph Myers <joseph@codesourcery.com>2020-03-17 22:57:42 +0000
commit49348beafe9ba150c9bd48595b3f372299bddbb0 (patch)
tree0cbdc15f875aac8bec4e3f2a719930a5ca5b26bf /libio/swscanf.c
parentcbd156990489568eb8c1b97ace3ad24fc784e049 (diff)
downloadglibc-49348beafe9ba150c9bd48595b3f372299bddbb0.tar.gz
glibc-49348beafe9ba150c9bd48595b3f372299bddbb0.tar.xz
glibc-49348beafe9ba150c9bd48595b3f372299bddbb0.zip
Fix build with GCC 10 when long double = double.
On platforms where long double has the same ABI as double, glibc
defines long double functions as aliases for the corresponding double
functions.  The declarations of those functions in <math.h> are
disabled to avoid problems with aliases having incompatible types, but
GCC 10 now gives errors for incompatible types when the long double
function is known to GCC as a built-in function, not just when there
is an incompatible header declaration.

This patch fixes those errors by using appropriate
-fno-builtin-<function> options to compile the double functions.  The
list of CFLAGS-* settings is an appropriately adapted version of that
in sysdeps/ieee754/ldbl-opt/Makefile used there for building nldbl-*.c
files; in particular, the options are used even if GCC does not
currently have a built-in function of a given function, so that adding
such a built-in function in future will not break the glibc build.
Thus, various of the CFLAGS-* settings are only for future-proofing
and may not currently be needed (and it's possible some could be
irrelevant for other reasons).

Tested with build-many-glibcs.py for arm-linux-gnueabi (compilers and
glibcs builds), where it fixes the build that previously failed.
Diffstat (limited to 'libio/swscanf.c')
0 files changed, 0 insertions, 0 deletions