[PATCH v8 2/4] Update math: redirect roundeven function

Stefan Liebler stli@linux.ibm.com
Tue Jun 29 07:14:21 GMT 2021


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


More information about the Libc-alpha mailing list