https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103886
--- Comment #4 from Janne Blomqvist <jb at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> (In reply to Janne Blomqvist from comment #2)
> > (In reply to Andrew Pinski from comment #1)
> > > Is there anything to be done as the time_t is now defaults to 64bit on the
> > > trunk of glibc?
> >
> > AFAIU it's not the default, you need to explicitly opt-in by setting the
> > _TIME_BITS preprocessor macro to 64 (64-bit time_t is the default on musl,
> > and {Net,Open}BSD ).
> >
> > Or are you saying that since the _TIME_BITS thing was introduced (with glibc
> > 2.34), the upcoming 2.35/trunk has changed the default?
>
> Yes, the upcoming 2.35 has changed the default:
> https://sourceware.org/pipermail/libc-alpha/2021-December/134576.html
I'm not super-familiar with glibc, but it seems that this changes the default
(in ./bits/timesize.h) to 64 for targets not overriding it, however it
adds/modifies a number of target-specific overrides to retain the previous
behavior? In particular for x86 there is
./sysdeps/unix/sysv/linux/x86/bits/timesize.h which says:
#if defined __x86_64__ && defined __ILP32__
/* For x32, time is 64-bit even though word size is 32-bit. */
# define __TIMESIZE 64
#else
/* For others, time size is word size. */
# define __TIMESIZE __WORDSIZE
#endif
If my reading of the above is correct, on 32-bit x86 __TIMESIZE is set to
__WORDSIZE, that is, 32.
Similarly for ./sysdeps/unix/sysv/linux/arm/bits/timesize.h it says
#define __TIMESIZE 32