[v8,2/4] Update math: redirect roundeven function
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
Commit Message
Redirect target specific roundeven functions for aarch64, ldbl-128ibm
and riscv.
---
sysdeps/aarch64/fpu/s_roundeven.c | 2 +-
sysdeps/aarch64/fpu/s_roundevenf.c | 1 +
sysdeps/ieee754/ldbl-128ibm/s_roundevenl.c | 1 +
sysdeps/riscv/rv64/rvd/s_roundeven.c | 2 +-
sysdeps/riscv/rvf/s_roundevenf.c | 1 +
5 files changed, 5 insertions(+), 2 deletions(-)
Comments
s390x fails to build.
gcc ../sysdeps/s390/fpu/s_roundevenl.c -c -std=gnu11 -fgnu89-inline -O2 -g -m64 -fmessage-length=0 -funwind-tables -fasynchronous-unwind-tables -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fstack-protector -Wstrict-prototypes -Wold-style-definition -fno-math-errno -mlong-double-128 -I../include -I/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math -I/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base -I../sysdeps/unix/sysv/linux/s390/s390-64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux/s390/fpu -I../sysdeps/s390/fpu -I../sysdeps/unix/sysv/linux/s390 -I../sysdeps/s390/nptl -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/s390/s390-64 -I../sysdeps/wordsize-64 -I../sysdeps/s390/multiarch -I../sysdeps/s390 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -include /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/libc-modules.h -DMODULE_NAME=libm -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o -MD -MP -MF /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o.dt -MT /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o
/tmp/ccYVXAks.s: Assembler messages:
/tmp/ccYVXAks.s:42: Error: symbol `__roundevenl' is already defined
make[2]: *** [/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/sysd-rules:135: /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o] Error 1
Andreas.
On 28/06/2021 10:08, Andreas Schwab wrote:
> s390x fails to build.
>
> gcc ../sysdeps/s390/fpu/s_roundevenl.c -c -std=gnu11 -fgnu89-inline -O2 -g -m64 -fmessage-length=0 -funwind-tables -fasynchronous-unwind-tables -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fstack-protector -Wstrict-prototypes -Wold-style-definition -fno-math-errno -mlong-double-128 -I../include -I/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math -I/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base -I../sysdeps/unix/sysv/linux/s390/s390-64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux/s390/fpu -I../sysdeps/s390/fpu -I../sysdeps/unix/sysv/linux/s390 -I../sysdeps/s390/nptl -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/s390/s390-64 -I../sysdeps/wordsize-64 -I../sysdeps/s390/multiarch -I../sysdeps/s390 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -include /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/libc-modules.h -DMODULE_NAME=libm -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o -MD -MP -MF /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o.dt -MT /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o
> /tmp/ccYVXAks.s: Assembler messages:
> /tmp/ccYVXAks.s:42: Error: symbol `__roundevenl' is already defined
> make[2]: *** [/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/sysd-rules:135: /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o] Error 1
>
> Andreas.
>
Hi Andreas,
I've also just recognized this issue and will post a patch later.
Thanks,
Stefan
On Mon, Jun 28, 2021 at 1:34 AM Stefan Liebler via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> On 28/06/2021 10:08, Andreas Schwab wrote:
> > s390x fails to build.
> >
> > gcc ../sysdeps/s390/fpu/s_roundevenl.c -c -std=gnu11 -fgnu89-inline -O2 -g -m64 -fmessage-length=0 -funwind-tables -fasynchronous-unwind-tables -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fstack-protector -Wstrict-prototypes -Wold-style-definition -fno-math-errno -mlong-double-128 -I../include -I/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math -I/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base -I../sysdeps/unix/sysv/linux/s390/s390-64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux/s390/fpu -I../sysdeps/s390/fpu -I../sysdeps/unix/sysv/linux/s390 -I../sysdeps/s390/nptl -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/s390/s390-64 -I../sysdeps/wordsize-64 -I../sysdeps/s390/multiarch -I../sysdeps/s390 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -include /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/libc-modules.h -DMODULE_NAME=libm -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o -MD -MP -MF /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o.dt -MT /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o
> > /tmp/ccYVXAks.s: Assembler messages:
> > /tmp/ccYVXAks.s:42: Error: symbol `__roundevenl' is already defined
> > make[2]: *** [/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/sysd-rules:135: /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o] Error 1
> >
> > Andreas.
> >
>
> Hi Andreas,
>
> I've also just recognized this issue and will post a patch later.
>
Sorry for this. Why didn't scripts/build-many-glibcs.py catch it?
$ s390x-glibc-linux-gnu-gcc ../sysdeps/s390/fpu/s_roundevenl.c -c
-std=gnu11 -fgnu89-inline -g -O2 -Wall -Wwrite-strings -Wundef
-Werror -fmerge-all-constants -frounding-math -fno-stack-protector
-Wstrict-prototypes -Wold-style-definition -fno-math-errno
-mlong-double-128 -I../include
-I/export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/math
-I/export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc
-I../sysdeps/unix/sysv/linux/s390/s390-64
-I../sysdeps/unix/sysv/linux/wordsize-64
-I../sysdeps/unix/sysv/linux/s390/fpu -I../sysdeps/s390/fpu
-I../sysdeps/unix/sysv/linux/s390 -I../sysdeps/s390/nptl
-I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux
-I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/s390/s390-64
-I../sysdeps/wordsize-64 -I../sysdeps/s390/multiarch
-I../sysdeps/s390 -I../sysdeps/ieee754/ldbl-128
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I.
-D_LIBC_REENTRANT -include
/export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/libc-modules.h
-DMODULE_NAME=libm -include ../include/libc-symbols.h
-DTOP_NAMESPACE=glibc -o
/export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/math/s_roundevenl.o
-MD -MP -MF /export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/math/s_roundevenl.o.dt
-MT /export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/math/s_roundevenl.o
compiled fine.
On 28/06/2021 13:42, H.J. Lu wrote:
> On Mon, Jun 28, 2021 at 1:34 AM Stefan Liebler via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
>>
>> On 28/06/2021 10:08, Andreas Schwab wrote:
>>> s390x fails to build.
>>>
>>> gcc ../sysdeps/s390/fpu/s_roundevenl.c -c -std=gnu11 -fgnu89-inline -O2 -g -m64 -fmessage-length=0 -funwind-tables -fasynchronous-unwind-tables -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fstack-protector -Wstrict-prototypes -Wold-style-definition -fno-math-errno -mlong-double-128 -I../include -I/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math -I/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base -I../sysdeps/unix/sysv/linux/s390/s390-64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux/s390/fpu -I../sysdeps/s390/fpu -I../sysdeps/unix/sysv/linux/s390 -I../sysdeps/s390/nptl -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/s390/s390-64 -I../sysdeps/wordsize-64 -I../sysdeps/s390/multiarch -I../sysdeps/s390 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -D_LIBC_REENTRANT -include /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/libc-modules.h -DMODULE_NAME=libm -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -o /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o -MD -MP -MF /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o.dt -MT /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o
>>> /tmp/ccYVXAks.s: Assembler messages:
>>> /tmp/ccYVXAks.s:42: Error: symbol `__roundevenl' is already defined
>>> make[2]: *** [/home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/sysd-rules:135: /home/abuild/rpmbuild/BUILD/glibc-2.33.9000.810.g5adda61f62/cc-base/math/s_roundevenl.o] Error 1
>>>
>>> Andreas.
>>>
>>
>> Hi Andreas,
>>
>> I've also just recognized this issue and will post a patch later.
>>
>
> Sorry for this. Why didn't scripts/build-many-glibcs.py catch it?
>
> $ s390x-glibc-linux-gnu-gcc ../sysdeps/s390/fpu/s_roundevenl.c -c
> -std=gnu11 -fgnu89-inline -g -O2 -Wall -Wwrite-strings -Wundef
> -Werror -fmerge-all-constants -frounding-math -fno-stack-protector
> -Wstrict-prototypes -Wold-style-definition -fno-math-errno
> -mlong-double-128 -I../include
> -I/export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/math
> -I/export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc
> -I../sysdeps/unix/sysv/linux/s390/s390-64
> -I../sysdeps/unix/sysv/linux/wordsize-64
> -I../sysdeps/unix/sysv/linux/s390/fpu -I../sysdeps/s390/fpu
> -I../sysdeps/unix/sysv/linux/s390 -I../sysdeps/s390/nptl
> -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt
> -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux
> -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu
> -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix
> -I../sysdeps/posix -I../sysdeps/s390/s390-64
> -I../sysdeps/wordsize-64 -I../sysdeps/s390/multiarch
> -I../sysdeps/s390 -I../sysdeps/ieee754/ldbl-128
> -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32
> -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I.
> -D_LIBC_REENTRANT -include
> /export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/libc-modules.h
> -DMODULE_NAME=libm -include ../include/libc-symbols.h
> -DTOP_NAMESPACE=glibc -o
> /export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/math/s_roundevenl.o
> -MD -MP -MF /export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/math/s_roundevenl.o.dt
> -MT /export/project/tools-build/glibc-many/build/glibcs/s390x-linux-gnu/glibc/math/s_roundevenl.o
>
> compiled fine.
>
I assume, that the default ALS of gcc is older than z196. Then
sysdeps/ieee754/ldbl-128/s_roundevenl.c is included which builds fine.
I've wanted to add some different ALS-levels in the past, but in the
end, we only added -O3 due to more aggressive inlining on s390x:
https://sourceware.org/pipermail/libc-alpha/2020-August/116839.html
Bye,
Stefan
@@ -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>
@@ -25,5 +26,4 @@ __roundeven (double x)
asm volatile ("frintn \t%d0, %d1" : "=w" (x) : "w" (x));
return x;
}
-hidden_def (__roundeven)
libm_alias_double (__roundeven, roundeven)
@@ -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>
@@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#define NO_MATH_REDIRECT
#include <math.h>
#include <math_private.h>
@@ -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 <fenv_private.h>
#include <libm-alias-double.h>
@@ -49,5 +50,4 @@ __roundeven (double x)
return x;
}
-hidden_def (__roundeven)
libm_alias_double (__roundeven, roundeven)
@@ -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 <fenv_private.h>
#include <libm-alias-float.h>