]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Fix x86_64 build failure with -Os (BZ 33367)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 23 Dec 2025 17:30:45 +0000 (14:30 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 12 Jan 2026 13:34:40 +0000 (10:34 -0300)
commit422c3a5baf3cbe5d212c240bce99dbafed55d4ef
tree07e1084ee7c2ff40a0f9c7d0752cac344d3bc822
parent8efe2b03db6591139e10a90462308cb3afe302bc
x86: Fix x86_64 build failure with -Os (BZ 33367)

The 13cfd77bf5 change broke the b5d88fa6c3 fix by removing the symbol
to __symbol redirections.  Although it works for -O2 with both gcc
and clang, with -Os without the redirection, the libcall might still
be issued.

This patch reinstates the b5d88fa6c3 fix, with a modification that
allows each ifunc variant to control which trunc to issue.  This is
required for clang, which defines HAVE_X86_INLINE_TRUNC to 1 (meaning
that trunc will always be lowered to the instruction on -Os).

Checked on x86_64-linux-gnu with -O2 and -Os with gcc-15 and clang-18.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
sysdeps/ieee754/dbl-64/s_modf.c
sysdeps/ieee754/flt-32/s_modff.c
sysdeps/x86_64/fpu/multiarch/s_modf-avx.c
sysdeps/x86_64/fpu/multiarch/s_modf-sse4_1.c
sysdeps/x86_64/fpu/multiarch/s_modff-avx.c
sysdeps/x86_64/fpu/multiarch/s_modff-sse4_1.c