* [Buildroot] [git commit] docs/manual: add a FAQ entry about Y2038 support
@ 2023-10-01 19:14 Thomas Petazzoni via buildroot
2023-10-02 8:59 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-10-01 19:14 UTC (permalink / raw)
To: buildroot
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.
+
+ ** 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.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [git commit] docs/manual: add a FAQ entry about Y2038 support
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
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2023-10-02 8:59 UTC (permalink / raw)
To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni
>>>>> "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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-02 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.