[PATCH 37/59] math: Fix modf{f} build on clang

H.J. Lu hjl.tools@gmail.com
Sat Oct 18 06:28:31 GMT 2025


On Sat, Oct 18, 2025 at 3:58 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> We need to disable the internal optimize for math builtins
> (NO_MATH_REDIRECT) for the USE_TRUNC_BUILTIN case.

Does it change GCC codegen?

> ---
>  sysdeps/ieee754/dbl-64/s_modf.c  | 1 +
>  sysdeps/ieee754/flt-32/s_modff.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/sysdeps/ieee754/dbl-64/s_modf.c b/sysdeps/ieee754/dbl-64/s_modf.c
> index 90cd8e8c3e..727dc412c0 100644
> --- a/sysdeps/ieee754/dbl-64/s_modf.c
> +++ b/sysdeps/ieee754/dbl-64/s_modf.c
> @@ -16,6 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>
> +#define NO_MATH_REDIRECT
>  #include <math.h>
>  #include <libm-alias-double.h>
>  #include "math_config.h"
> diff --git a/sysdeps/ieee754/flt-32/s_modff.c b/sysdeps/ieee754/flt-32/s_modff.c
> index 965136bac9..a06178f803 100644
> --- a/sysdeps/ieee754/flt-32/s_modff.c
> +++ b/sysdeps/ieee754/flt-32/s_modff.c
> @@ -16,6 +16,7 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>
> +#define NO_MATH_REDIRECT
>  #include <math.h>
>  #include <libm-alias-float.h>
>  #include "math_config.h"
> --
> 2.43.0
>


-- 
H.J.


More information about the Libc-alpha mailing list