Toolchain (host-gcc-final-14.1.0) build failure with y2038/BR2_TIME_BITS_64 enabled

What I did

Buildroot: git master (commit d611acf8)

Distribution of the build machine: openSUSE Tumbleweed (20240708)

Try to build the following defconfig (derived from raspberrypi4_defconfig):

BR2_arm=y
BR2_cortex_a72=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_BINUTILS_VERSION_2_42_X=y
BR2_GCC_VERSION_14_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_TIME_BITS_64=y

What happens

Fails with:

  In file included from .../host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/features.h:394,
                   from ../../../../libsanitizer/sanitizer_common/sanitizer_platform.h:25,
                   from ../../../../libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp:14:
  .../host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
     26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
        |     ^~~~~

Extra information

Reverting upstream commit [1] fixes the issue...

[1] https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=77d0627c244f7520bf74ec9cf2a8b69c32b6d30d