Pārlūkot izejas kodu

package/util-linux: allowing building even on non-Y2038 compliant systems

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 [0]. 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" is already used to build tar package since [1].

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992338 (TestIso9660SyslinuxInternal)
https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992337 (TestIso9660SyslinuxExternalCompress)
https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992335 (TestIso9660SyslinuxExternal)
https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992259 (TestSysLinuxX86LegacyBios)
https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992257 (TestSysLinuxX86EFI)

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

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Romain Naour 9 mēneši atpakaļ
vecāks
revīzija
11ae90b001
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      package/util-linux/util-linux.mk

+ 5 - 1
package/util-linux/util-linux.mk

@@ -42,9 +42,13 @@ UTIL_LINUX_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \
 	$(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_LIBS),util-linux-libs) \
 	$(if $(BR2_PACKAGE_UTIL_LINUX_LIBS),util-linux-libs) \
 	$(TARGET_NLS_DEPENDENCIES)
 	$(TARGET_NLS_DEPENDENCIES)
+# --disable-year2038: tells the configure script to not abort if the
+# system is not Y2038 compliant. util-linux will support year2038 if
+# the system is compliant even with this option passed
 UTIL_LINUX_CONF_OPTS += \
 UTIL_LINUX_CONF_OPTS += \
 	--disable-rpath \
 	--disable-rpath \
-	--disable-makeinstall-chown
+	--disable-makeinstall-chown \
+	--disable-year2038
 
 
 UTIL_LINUX_LINK_LIBS = $(TARGET_NLS_LIBS)
 UTIL_LINUX_LINK_LIBS = $(TARGET_NLS_LIBS)