GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
libstdc++

libstdc++: Fix bootstrap failure in tzdb.cc with specific atomic conditions

Fixes a bootstrap build failure in tzdb.cc by ensuring atomic functions are always defined, regardless of target atomic pointer and integer lock-free condition…

A recent change in libstdc++ caused a bootstrap failure in tzdb.cc when certain atomic pointer and integer lock-free conditions were met on the target. The error occurred because the NumLeapSeconds::set_locked member function was not defined under these specific conditions. This fix ensures that the set_atomically and set_locked functions are defined unconditionally, resolving the mismatch and allowing the build to complete successfully.

In Details

This commit addresses a bootstrap failure in std::chrono::tzdb_list::_Node::_S_replace_head on targets where ATOMIC_POINTER_LOCK_FREE != 2 and ATOMIC_INT_LOCK_FREE == 2. The issue stemmed from conditional definitions of NumLeapSeconds::set_locked and set_atomically within tzdb.cc. The fix makes these functions unconditional to ensure their availability in all relevant code paths, preventing the build error.

Filed Under: libstdc++buildatomic