[Buildroot] [git commit branch/next] package/util-linux-libs: allowing building even on non-Y2038 compliant systems

Peter Korsgaard peter at korsgaard.com
Fri Feb 28 16:29:48 UTC 2025


commit: https://git.buildroot.net/buildroot/commit/?id=fa20df5d75914cf99df8c968681fb74a688c0129
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

Since the bump of util-linux to version 2.40.2 in Buildroot commit
f14929c657a7b1794dcd39ac469d2ad826465d98 ("package/util-linux: update
to 2.40.2"), the build will fail on systems that are not Y2038,
such as uClibc configurations.

In order to preserve the previous behavior, pass --disable-year2038.
See the gnulib documentation for details [1]. Contrary to what the
option name might suggest, it doesn't really disable Y2038 support,
but only the check that the system is Y2038 compliant. So even with
--disable-year2038, if the system is Y2038 compliant (uses a 64-bit
arch, uses the musl C library, or uses the glibc C library with
BR2_TIME_BITS_64=y), util-linux tools will be Y2038 compliant.

"--disable-year2038" was already added to util-linux in commit
11ae90b00 "package/util-linux: allowing building even on non-Y2038
compliant systems".

Fixes:
https://autobuild.buildroot.org/results/630fc287deb1cf5a684f274058b918a5d7aef989

[1] https://www.gnu.org/software/gnulib/manual/html_node/Avoiding-the-year-2038-problem.html

Reviewed-by: Vincent Jardin <vjardin at free.fr>
Signed-off-by: Julien Olivain <ju.o at free.fr>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/util-linux/util-linux-libs/util-linux-libs.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/util-linux/util-linux-libs/util-linux-libs.mk b/package/util-linux/util-linux-libs/util-linux-libs.mk
index 0337e7e13a..9340d5ae4f 100644
--- a/package/util-linux/util-linux-libs/util-linux-libs.mk
+++ b/package/util-linux/util-linux-libs/util-linux-libs.mk
@@ -26,9 +26,13 @@ UTIL_LINUX_LIBS_DEPENDENCIES = \
 	host-pkgconf \
 	$(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \
 	$(TARGET_NLS_DEPENDENCIES)
+# --disable-year2038: tells the configure script to not abort if the
+# system is not Y2038 compliant. util-linux-libs will support year2038
+# if the system is compliant even with this option passed
 UTIL_LINUX_LIBS_CONF_OPTS += \
 	--disable-rpath \
-	--disable-makeinstall-chown
+	--disable-makeinstall-chown \
+	--disable-year2038
 
 UTIL_LINUX_LIBS_LINK_LIBS = $(TARGET_NLS_LIBS)
 


More information about the buildroot mailing list