Compile libmvec with -fno-math-errno

Rounding intrinsics may not be inlined without
-fno-math-errno. libmvec is free to do what it
likes with errno, so disable it for better
performance.

Tested with no regression on aarch64 and x86_64.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
This commit is contained in:
Joe Ramsay 2024-05-16 09:16:36 +01:00 committed by Szabolcs Nagy
parent c35cad016b
commit c39cf53702

View File

@ -899,9 +899,10 @@ endif
+math-flags = -frounding-math +math-flags = -frounding-math
# Logically only "libnldbl", "nonlib" and "testsuite" should be using # Logically only "libnldbl", "nonlib" and "testsuite" should be using
# -fno-math-errno. However due to GCC bug #88576, only "libm" can use # -fno-math-errno. However due to GCC bug #88576, only "libm" and
# -fno-math-errno. # "libmvec" can use -fno-math-errno.
+extra-math-flags = $(if $(filter libm,$(in-module)),-fno-math-errno,-fmath-errno) +extra-math-flags = $(if $(filter libmvec libm,$(in-module)),\
-fno-math-errno,-fmath-errno)
# Use 64 bit time_t support for installed programs # Use 64 bit time_t support for installed programs
installed-modules = nonlib nscd ldconfig locale_programs \ installed-modules = nonlib nscd ldconfig locale_programs \