https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119550
--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:97cbe3cd5f36470884e940bda4469dc9b5b93cfd commit r15-9110-g97cbe3cd5f36470884e940bda4469dc9b5b93cfd Author: Jonathan Wakely <jwak...@redhat.com> Date: Mon Mar 31 15:07:12 2025 +0100 Libstdc++: Fix bootstrap failure for cross without tm.tm_zone [PR119550] In r15-8491-g778c28c70f8573 I added a use of the Autoconf macro AC_STRUCT_TIMEZONE, but that requires a link-test for the global tzname object if tm.tm_zone isn't supported. That link-test isn't allowed for cross-compilation, so bootstrap fails if tm.tm_zone isn't supported. Since libstdc++ only cares about tm.tm_zone and won't use tzname anyway, we don't need the link-test. Replace AC_STRUCT_TIMEZONE with a custom macro that only checks for tm.tm_zone. We can improve on the Autoconf macro by checking it's a suitable type, which isn't actually checked by AC_STRUCT_TIMEZONE. libstdc++-v3/ChangeLog: PR libstdc++/119550 * acinclude.m4 (GLIBCXX_STRUCT_TM_TM_ZONE): New macro. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Use GLIBCXX_STRUCT_TM_TM_ZONE. * include/bits/chrono_io.h (__formatter_chrono::_M_c): Check _GLIBCXX_USE_STRUCT_TM_TM_ZONE instead of _GLIBCXX_HAVE_STRUCT_TM_TM_ZONE.