Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 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 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 11 | GLIBC_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 ) |
| 15 | TARGET_CC_ARCH:append:arm = "${GLIBC_64BIT_TIME_FLAGS}" |
| 16 | TARGET_CC_ARCH:append:armeb = "${GLIBC_64BIT_TIME_FLAGS}" |
| 17 | TARGET_CC_ARCH:append:mipsarcho32 = "${GLIBC_64BIT_TIME_FLAGS}" |
| 18 | TARGET_CC_ARCH:append:powerpc = "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${GLIBC_64BIT_TIME_FLAGS}', '', d)}" |
| 19 | TARGET_CC_ARCH:append:x86 = "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${GLIBC_64BIT_TIME_FLAGS}', '', d)}" |
| 20 | |
| 21 | GLIBC_64BIT_TIME_FLAGS:pn-glibc = "" |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 22 | GLIBC_64BIT_TIME_FLAGS:pn-glibc-y2038-tests = "" |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 23 | GLIBC_64BIT_TIME_FLAGS:pn-glibc-testsuite = "" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 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 |
| 27 | GLIBC_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 Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 30 | # See https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3770 |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 31 | GLIBC_64BIT_TIME_FLAGS:pn-pulseaudio = "" |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 32 | # Undefines _FILE_OFFSET_BITS on purpose in |
| 33 | # libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 34 | GLIBC_64BIT_TIME_FLAGS:pn-gcc-sanitizers = "" |
| 35 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 36 | # Caused by the flags exceptions above |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 37 | INSANE_SKIP:append:pn-gcc-sanitizers = " 32bit-time" |
| 38 | INSANE_SKIP:append:pn-glibc = " 32bit-time" |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 39 | INSANE_SKIP:append:pn-glibc-y2038-tests = " 32bit-time" |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 40 | INSANE_SKIP:append:pn-pulseaudio = " 32bit-time" |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 41 | |
| 42 | # Strace has tests that call 32 bit API directly, which is fair enough, e.g. |
| 43 | # /usr/lib/strace/ptest/tests/ioctl_termios uses 32-bit api 'ioctl' |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 44 | INSANE_SKIP:append:pn-strace = " 32bit-time" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 45 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 46 | # Additionally cargo_common class (i.e. everything written in rust) |
| 47 | # has the same INSANE_SKIP setting. |
| 48 | # Please check the comment in meta/classes-recipe/cargo_common.bbclass |
| 49 | # for information about why, and the overall Y2038 situation in rust. |