]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: Suppress clang -Wincompatible-library-redeclaration on s_llround
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 17 Oct 2025 19:12:55 +0000 (16:12 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 21 Oct 2025 12:24:27 +0000 (09:24 -0300)
Clang issues:

  ../sysdeps/ieee754/dbl-64/s_llround.c:83:30: error: incompatible
  redeclaration of library function 'lround'
  [-Werror,-Wincompatible-library-redeclaration]
  libm_alias_double (__lround, lround)
                               ^
  ../sysdeps/ieee754/dbl-64/s_llround.c:83:30: note: 'lround' is a builtin
  with type 'long (double)'

Reviewed-by: Sam James <sam@gentoo.org>
sysdeps/ieee754/dbl-64/Makefile

index 766bef4a35d01d3d0f9aa3cf584731aa884613f8..ac2e2ecc5ea0f729d9d2febdd096e740bbb80bfd 100644 (file)
@@ -2,6 +2,9 @@ ifeq ($(subdir),math)
 # branred depends on precise IEEE double rounding
 CFLAGS-branred.c += $(config-cflags-nofma)
 CFLAGS-e_sqrt.c += $(config-cflags-nofma)
+
+# The symbols alias to lround
+CFLAGS-s_llround.c += -fno-builtin-lround
 endif
 
 ifeq ($(subdir),stdio-common)