blob: bc0c72226ba8ef020233189df8e1bb7fb043e42a [file] [log] [blame]
Andrew Geissler028142b2023-05-05 11:29:21 -05001# 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
Andrew Geissler517393d2023-01-13 08:55:19 -060011GLIBC_64BIT_TIME_FLAGS = " -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
12
13# Only needed for some 32-bit architectures, some relatively newer
14# architectures do not need it ( e.g. riscv32 )
15TARGET_CC_ARCH:append:arm = "${GLIBC_64BIT_TIME_FLAGS}"
16TARGET_CC_ARCH:append:armeb = "${GLIBC_64BIT_TIME_FLAGS}"
17TARGET_CC_ARCH:append:mipsarcho32 = "${GLIBC_64BIT_TIME_FLAGS}"
18TARGET_CC_ARCH:append:powerpc = "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${GLIBC_64BIT_TIME_FLAGS}', '', d)}"
19TARGET_CC_ARCH:append:x86 = "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${GLIBC_64BIT_TIME_FLAGS}', '', d)}"
20
21GLIBC_64BIT_TIME_FLAGS:pn-glibc = ""
22GLIBC_64BIT_TIME_FLAGS:pn-glibc-tests = ""
Andrew Geissler028142b2023-05-05 11:29:21 -050023GLIBC_64BIT_TIME_FLAGS:pn-glibc-testsuite = ""
Andrew Geissler517393d2023-01-13 08:55:19 -060024# 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# Pulseaudio override certain LFS64 functions e.g. open64 and intentionally
29# undefines _FILE_OFFSET_BITS, which wont work when _TIME_BITS=64 is set
Andrew Geissler8f840682023-07-21 09:09:43 -050030# See https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3770
Andrew Geissler517393d2023-01-13 08:55:19 -060031GLIBC_64BIT_TIME_FLAGS:pn-pulseaudio = ""
Andrew Geissler8f840682023-07-21 09:09:43 -050032# Undefines _FILE_OFFSET_BITS on purpose in
33# libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
Andrew Geissler517393d2023-01-13 08:55:19 -060034GLIBC_64BIT_TIME_FLAGS:pn-gcc-sanitizers = ""
Andrew Geissler8f840682023-07-21 09:09:43 -050035# https://github.com/strace/strace/issues/250
36GLIBC_64BIT_TIME_FLAGS:pn-strace = ""
Andrew Geissler517393d2023-01-13 08:55:19 -060037
Andrew Geissler8f840682023-07-21 09:09:43 -050038# Caused by the flags exceptions above
Andrew Geissler028142b2023-05-05 11:29:21 -050039INSANE_SKIP:append:pn-gcc-sanitizers = " 32bit-time"
40INSANE_SKIP:append:pn-glibc = " 32bit-time"
41INSANE_SKIP:append:pn-glibc-tests = " 32bit-time"
Andrew Geissler028142b2023-05-05 11:29:21 -050042INSANE_SKIP:append:pn-pulseaudio = " 32bit-time"
Andrew Geissler8f840682023-07-21 09:09:43 -050043
44# Strace has tests that call 32 bit API directly, which is fair enough, e.g.
45# /usr/lib/strace/ptest/tests/ioctl_termios uses 32-bit api 'ioctl'
Andrew Geissler028142b2023-05-05 11:29:21 -050046INSANE_SKIP:append:pn-strace = " 32bit-time"
Andrew Geissler517393d2023-01-13 08:55:19 -060047
Andrew Geissler8f840682023-07-21 09:09:43 -050048# Additionally cargo_common class (i.e. everything written in rust)
49# has the same INSANE_SKIP setting.
50# Please check the comment in meta/classes-recipe/cargo_common.bbclass
51# for information about why, and the overall Y2038 situation in rust.