diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2025-03-31 15:07:12 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-03-31 22:54:08 +0100 |
commit | 97cbe3cd5f36470884e940bda4469dc9b5b93cfd (patch) | |
tree | 1f4bf09a7630138d76a7375d44328f161744a9fd /gcc/testsuite/gcc.dg/cpp | |
parent | 0cb8889e51b91871121fb73c0457dc2a55b0f909 (diff) | |
download | gcc-97cbe3cd5f36470884e940bda4469dc9b5b93cfd.zip gcc-97cbe3cd5f36470884e940bda4469dc9b5b93cfd.tar.gz gcc-97cbe3cd5f36470884e940bda4469dc9b5b93cfd.tar.bz2 |
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.
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp')
0 files changed, 0 insertions, 0 deletions