openwrt-redmi-ax3000/include
Michael Pratt 39e8ef33bf build: add test for 64-bit time support
Several GNU tools such as tar, coreutils, and findutils
now build with support for 64-bit time by default
and otherwise require reconfiguring with a flag
--disable-year2038 in order to build without 64-bit time.

Some standard C libraries, for example,
certain older versions of glibc such as 2.31
have large file support but not long time bits support:

  checking for ... option to enable large file support... -D_FILE_OFFSET_BITS=64
  checking for ... option for timestamps after 2038... support not detected

This test using C code taken from largefile.m4 in gnulib
uses math and casting to check for overflow
with a macro and array pair that can only be defined
when 64-bit time support is present, and otherwise errors.
It is the exact same code used to test for 64-bit time
during the configure stage of building these tools,
so the results of this test before configure takes place
will always be in concordance with the results of
the test that takes place during the configure script.

Based on the test, the configure flag --disable-year2038
is added to every host tool build depending on the host system.

When the year 2038 problem finally comes around,
the effect of the test can be converted
from the toggling of a configure option into a build prerequisite,
requiring it to pass in order to continue building.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15799
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-06-27 09:31:53 +02:00
..
site loongarch64: new target 2024-05-04 14:14:16 +08:00
autotools.mk
bpf.mk bpf: also include toolchain standard header as system header 2024-06-17 13:48:29 +02:00
cmake.mk
debug.mk
depends.mk
device_table.txt
download.mk download: don't overwrite VERSION variable 2024-04-29 08:39:25 +02:00
feeds.mk build: add APK package build capabilities 2024-05-17 23:21:26 +03:00
hardened-ld-pie.specs
hardening.mk
host-build.mk build: add test for 64-bit time support 2024-06-27 09:31:53 +02:00
image-commands.mk build: move Build/buffalo-trx to image-commands.mk 2024-06-05 21:14:16 +02:00
image.mk build: add APK package build capabilities 2024-05-17 23:21:26 +03:00
kernel-5.15 kernel: bump 5.15 to 5.15.158 2024-05-12 12:16:18 +02:00
kernel-6.1 kernel: bump 6.1 to 6.1.95 2024-06-23 16:33:41 +02:00
kernel-6.6 kernel: bump 6.6 to 6.6.35 2024-06-22 16:50:57 +02:00
kernel-build.mk
kernel-defaults.mk
kernel-version.mk
kernel.mk loongarch64: new target 2024-05-04 14:14:16 +08:00
logo.png
logo.svg
meson.mk
netfilter.mk
nls.mk
openssl-module.mk
package-bin.mk
package-defaults.mk
package-dumpinfo.mk build: remove duplicate MAINTAINER from package-dumpinfo.mk 2024-05-07 22:24:10 +02:00
package-pack.mk Revert "apk: limit CONFIG_IPK_FILES_CHECKSUMS config to OPKG" 2024-06-20 05:52:05 +02:00
package-seccomp.mk
package.mk build: add APK package build capabilities 2024-05-17 23:21:26 +03:00
prereq-build.mk
prereq.mk
quilt.mk
rootfs.mk include/rootfs: improve readability of OPKG status fixup block 2024-06-11 23:58:12 +02:00
scan.awk
scan.mk
shell.sh
subdir.mk
target.mk target.mk: improve handling of default enabled SECCOMP 2024-06-19 16:19:10 +02:00
toolchain-build.mk
toplevel.mk toplevel.mk: make sure tmp exist for .packagedynamicdefault 2024-06-12 15:55:17 +02:00
trusted-firmware-a.mk include/trusted-firmware-a.mk: allow overriding package install template 2024-05-07 22:01:42 +02:00
u-boot.mk
uclibc++.mk
unpack.mk
verbose.mk
version.mk