[PATCH 1/3] y2038: linux: Provide __futimes64 implementation

Lukasz Majewski lukma at denx.de
Wed Jul 8 02:58:57 EDT 2020


Hi Vineet,

> On 7/7/20 12:21 AM, Lukasz Majewski wrote:
> >> ARC is 32-bit + TIMESIZE==64 but the new code is not getting built
> >> (instead generic variant is). How do I override the generic fiel to
> >> be built instead ?  
> > The futimes.c from sysdeps/unix/sysv/linux/ shall be built. 
> > 
> > The futimes.c is defined in following locations:
> > y2038-glibc/misc
> > y2038-glibc/sysdeps/unix/sysv/linux
> > y2038-glibc/sysdeps/mach/hurd
> > 
> > The first one is a stub. The last one is for hurd.
> > ARC shall use the middle one as well.  
> 
> It seems I mixed up the various *utime* files.
> Following are currently building for ARC
> 
> sysdeps/unix/sysv/linux/generic/futimesat.c
> sysdeps/unix/sysv/linux/generic/utimes.c    #2
> 
> sysdeps/unix/sysv/linux/futimes.c
> sysdeps/unix/sysv/linux/futimens.c
> sysdeps/unix/sysv/linux/utimensat.c
> 
> The issue is generic/utimes.c
> 
> Is that the right file to build. If yes then it needs fixing as it
> expects __NR_utimensat (and thus require the aliasing hack in ARC
> sysdep.h)
> 
> #define __NR_utimensat		__NR_utimensat_time6
> 
> P.S. I know glibc wiki has a bunch of pages (from Arnd?) for the
> y2038 support. 

This wiki page was developed by Albert Aribaud and shall give you a
grasp about the work needed for Y2038 conversion.

However, it is now outdated as we already made some progress.

The most accurate list of supported/converted syscalls can be found
here:
https://github.com/lmajewski/y2038_glibc/commit/b94a7f1126dc5bd652ba3a856753e85e48a6e845

and the most up to date development branch for Y2038 conversion:
https://github.com/lmajewski/y2038_glibc/commits/y2038_edge

(I've sent yesterday a patch series to convert futex to futex_time64).

> Are there other (newer) docs which explain the whole
> song and dance or is it the usual RTFC.
> 
> > When I'm in doubt (or when for example code is auto generated to
> > wrap a syscall) I do use
> > https://github.com/lmajewski/meta-y2038/blob/master/README
> > 
> > with gdb to check which function is called. Maybe it would help you
> > too?  
> 
> Yeah. I typically use build logs to see which exact file is built and
> then objdump to corroborate.

Ok.

> 




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 at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-snps-arc/attachments/20200708/e9a2128d/attachment.sig>


More information about the linux-snps-arc mailing list