xref: /openbmc/openbmc/poky/meta/conf/distro/include/time64.inc (revision c9537f57ab488bf5d90132917b0184e2527970a5)
1# To simulate Y2038 occurring in qemu, add to your build configuration:
2# QB_OPT_APPEND:append = " -rtc base=2040-02-02"
3#
4# Note that this does result in ptest failures on qemux86:
5# perl python3 dbus openssl glibc-tests openssh curl glib-2.0 tcl libmodule-build-perl
6# and a subset of those occurs in qemux86-64 as well:
7# curl python3 openssl openssl tcl python3-cryptography
8#
9# Working to address those (before Y2038 rolls in) will be appreciated.
10
11GLIBC_64BIT_TIME_FLAGS = "${GLIBC_64BIT_TIME_FLAGS_WHEN_NEEDED}"
12
13# Only needed for some 32-bit architectures, some relatively newer
14# architectures do not need it ( e.g. riscv32 )
15GLIBC_64BIT_TIME_FLAGS_WHEN_NEEDED = " -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
16TARGET_CC_ARCH:append:arm = "${GLIBC_64BIT_TIME_FLAGS}"
17TARGET_CC_ARCH:append:armeb = "${GLIBC_64BIT_TIME_FLAGS}"
18TARGET_CC_ARCH:append:mipsarcho32 = "${GLIBC_64BIT_TIME_FLAGS}"
19TARGET_CC_ARCH:append:powerpc = "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${GLIBC_64BIT_TIME_FLAGS}', '', d)}"
20TARGET_CC_ARCH:append:x86 = "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${GLIBC_64BIT_TIME_FLAGS}', '', d)}"
21
22GLIBC_64BIT_TIME_FLAGS:pn-glibc = ""
23GLIBC_64BIT_TIME_FLAGS:pn-glibc-testsuite = ""
24# pipewire-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to
25# both 32 and 64 bit file APIs.  But it does not handle the time side?
26# Needs further investigation
27GLIBC_64BIT_TIME_FLAGS:pn-pipewire = ""
28# Undefines _FILE_OFFSET_BITS on purpose in
29# libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
30GLIBC_64BIT_TIME_FLAGS:pn-gcc-sanitizers = ""
31
32# Caused by the flags exceptions above
33INSANE_SKIP:append:pn-gcc-sanitizers = " 32bit-time"
34INSANE_SKIP:append:pn-glibc = " 32bit-time"
35
36# Strace has tests that call 32 bit API directly, which is fair enough, e.g.
37# /usr/lib/strace/ptest/tests/ioctl_termios uses 32-bit api 'ioctl'
38INSANE_SKIP:append:pn-strace = " 32bit-time"
39
40# Pseudo has to wrap all glibc calls including the 32 bit ones even
41# if it doesn't use them itself
42INSANE_SKIP:append:pn-pseudo = " 32bit-time"
43
44# Additionally cargo_common class (i.e. everything written in rust)
45# has the same INSANE_SKIP setting.
46# Please check the comment in meta/classes-recipe/cargo_common.bbclass
47# for information about why, and the overall Y2038 situation in rust.
48
49# binutils/gcc/gdb still need fixing for qemuarm/qemuarmv5/qemumips/qemuppc/qemux86
50#binutils-cross-canadian-arm-2.42-r0 do_package_qa: QA Issue: xxx/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-ranlib uses 32-bit api 'lstat'
51INSANE_SKIP:append:pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = " 32bit-time"
52#gcc-cross-canadian-arm-14.1.0-r0 do_package_qa: QA Issue: xxx/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/14.1.0/plugin/gengtype uses 32-bit api 'ctime'
53INSANE_SKIP:append:pn-gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = " 32bit-time"
54#gdb-cross-canadian-arm-16.1-r0 do_package_qa: QA Issue: xxx/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gdb uses 32-bit api 'lstat'
55INSANE_SKIP:append:pn-gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = " 32bit-time"
56