32bit builds broken by gettime64 vDSO patches

Lukasz Majewski lukma@denx.de
Fri Dec 13 14:05:00 GMT 2019


Hi Manuel,

> Hello,
> 
> 32bit builds of latest git head  (tested x86, MIPS o32, ARM, SH4)
> break on my system; 64 bit (arm64, x86_64) builds are fine.
> Reverting Alistair Francis' 2 clock_gettime64 patches fixes that.
> 
> In file included from ../sysdeps/unix/sysv/linux/clock_gettime.c:28:
> ../sysdeps/unix/sysv/linux/clock_gettime.c: In function
> ‘__clock_gettime64’: ../sysdeps/unix/sysv/linux/sysdep-vdso.h:40:15:
> error: ‘__vdso_clock_gettime64’ undeclared (first use in this
> function); did you mean ‘__vdso_clock_gettime’?
>    40 |     __typeof (__vdso_##name) vdsop = __vdso_##name;         \
>       |               ^~~~~~~
> ../sysdeps/unix/sysv/linux/clock_gettime.c:41:11: note: in expansion
> of macro ‘INLINE_VSYSCALL’
>    41 |    return INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
>       |           ^~~~~~~~~~~~~~~
> ../sysdeps/unix/sysv/linux/sysdep-vdso.h:40:15: note: each undeclared
> identifier is reported only once for each function it appears in
>    40 |     __typeof (__vdso_##name) vdsop = __vdso_##name;         \
>       |               ^~~~~~~
> ../sysdeps/unix/sysv/linux/clock_gettime.c:41:11: note: in expansion
> of macro ‘INLINE_VSYSCALL’
>    41 |    return INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
>       |           ^~~~~~~~~~~~~~~
> ../sysdeps/unix/sysv/linux/sysdep-vdso.h:42:15: warning: comparison
> between pointer and integer
>    42 |     if (vdsop != NULL)             \
>       |               ^~
> ../sysdeps/unix/sysv/linux/clock_gettime.c:41:11: note: in expansion
> of macro ‘INLINE_VSYSCALL’
>    41 |    return INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
>       |           ^~~~~~~~~~~~~~~
> In file included from ../sysdeps/unix/sysv/linux/clock_gettime.c:28:
> ../sysdeps/unix/sysv/linux/sysdep-vdso.h:44:35: error: called object
> ‘vdsop’ is not a function or function pointer
>    44 |  sc_ret = INTERNAL_VSYSCALL_CALL (vdsop, sc_err, nr, ##args);
>       \ |                                   ^~~~~
> ../sysdeps/unix/sysv/linux/sysdep-vdso.h:26:6: note: in definition of
> macro ‘INTERNAL_VSYSCALL_CALL’
>    26 |      funcptr (args)
>       |      ^~~~~~~
> ../sysdeps/unix/sysv/linux/clock_gettime.c:41:11: note: in expansion
> of macro ‘INLINE_VSYSCALL’
>    41 |    return INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
>       |           ^~~~~~~~~~~~~~~
> In file included from ../sysdeps/unix/sysv/linux/clock_gettime.c:28:
> ../sysdeps/unix/sysv/linux/sysdep-vdso.h:40:30: note: declared here
>    40 |     __typeof (__vdso_##name) vdsop = __vdso_##name;         \
>       |                              ^~~~~
> ../sysdeps/unix/sysv/linux/clock_gettime.c:41:11: note: in expansion
> of macro ‘INLINE_VSYSCALL’
>    41 |    return INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
>       |           ^~~~~~~~~~~~~~~
> make[2]: ***
> [/tmp-ram/portage/sys-libs/glibc-2.30-r3/work/build-x86-x86_64-pc-linux-gnu-nptl/sysd-rules:213:
> /tmp-ram/portage/sys-libs/glibc-2.30-r3/work/build-x86-x86_64-pc-linux-gnu-nptl/time/clock_gettime.o]
> Error 1 make[2]: Leaving directory
> '/tmp-ram/portage/sys-libs/glibc-2.30-r3/work/glibc-2.30/time'
> 
> glibc is configured thusly:
> configure --enable-stack-protector=no
> --enable-stackguard-randomization --disable-cet --enable-kernel=5.2.0
> --without-selinux --without-cvs --disable-werror --enable-bind-now
> --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --disable-profile
> --without-gd --with-headers=/usr/include --prefix=/usr
> --sysconfdir=/etc --localstatedir=/var --libdir=$(prefix)/lib
> --mandir=$(prefix)/share/man --infodir=$(prefix)/share/info
> --libexecdir=$(libdir)/misc/glibc
> --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=Gentoo
> 2.30-r3 p4 --enable-crypt --disable-systemtap --disable-nscd
> --disable-timezone-tools
> 

Do you use kernel headers > 5.1 but < 5.4 (32 bit) ? 

For 32 bit devices there is a fix available:
https://github.com/lmajewski/y2038_glibc/commit/93a26fc4b3c4c3f57dec539d1f3244f7ae417be3


> 
> Thanks!
>      Manuel




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 484 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-help/attachments/20191213/d364fb20/attachment.sig>


More information about the Libc-help mailing list