Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [git commit] docs/manual: add a FAQ entry about Y2038 support
Date: Mon, 02 Oct 2023 10:59:17 +0200	[thread overview]
Message-ID: <87h6n9h02i.fsf@48ers.dk> (raw)
In-Reply-To: <20231001191539.B15DC83F75@busybox.osuosl.org> (Thomas Petazzoni via buildroot's message of "Sun, 1 Oct 2023 21:14:07 +0200")

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > commit: https://git.buildroot.net/buildroot/commit/?id=f10f47ff2873d2259e4a03060e9cf0fd1b0f05e0
 > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

 > This was reviewed in person by Arnout.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > ---
 >  docs/manual/faq-troubleshooting.adoc | 28 ++++++++++++++++++++++++++++
 >  1 file changed, 28 insertions(+)

 > diff --git a/docs/manual/faq-troubleshooting.adoc b/docs/manual/faq-troubleshooting.adoc
 > index b08bf9bc4a..a61276d4c5 100644
 > --- a/docs/manual/faq-troubleshooting.adoc
 > +++ b/docs/manual/faq-troubleshooting.adoc
 > @@ -242,3 +242,31 @@ help reduce the build time:
 
 >   * Experiment with top-level parallel build, see
 >     xref:top-level-parallel-build[].
 > +
 > +[[faq-2038]]
 > +=== How does Buildroot support Y2038?
 > +
 > +There are multiple situations to consider:
 > +
 > + * On 64-bit architectures, there is no problem, as +time_t+ has
 > +   always been 64-bit.

 > +
 > + * On 32-bit architectures, the situation depends on the C library:
 > +
 > + ** With _uclibc-ng_, there is no support for 64-bit +time_t+ on
 > +    32-bit architectures, so systems using _uclibc-ng_ on 32-bit
 > +    platforms will not be Y2038 compatible.
 > +
 > + ** With _musl_, 64-bit +time_t+ has always been used on 32-bit
 > +    architectures, so systems using _musl_ on 32-bit platforms are
 > +    Y2038 compatible.

"has always been used" is not really true, it was added in musl 1.2.0:
https://musl.libc.org/time64.html

Maybe we should say "always uses" instead?

 > +
 > + ** With _glibc_, 64-bit +time_t+ on 32-bit architectures is enabled
 > +    by the Buildroot option +BR2_TIME_BITS_64+. With this option
 > +    enabled, systems using _glibc_ on 32-bit platforms are Y2038
 > +    compatible.
 > +
 > +Note that the above only comments about the capabilities of the C
 > +library. Individual user-space libraries or applications, even when
 > +built in a Y2038-compatible setup, can exhibit incorrect behavior if
 > +they do not make correct use of the time APIs and types.

We should probably also mention the kernel dependency, E.G. the above is
only correct if using Linux 5.6+ kernel / headers:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=22b17db4ea05561c7c8e4d770f10751e22e339f9

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2023-10-02  8:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-01 19:14 [Buildroot] [git commit] docs/manual: add a FAQ entry about Y2038 support Thomas Petazzoni via buildroot
2023-10-02  8:59 ` Peter Korsgaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6n9h02i.fsf@48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox