<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 12 Oct 2026 at 08:09, <<a href="mailto:hugo@beauzee.fr">hugo@beauzee.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Hugo Beauzée-Luyssen <<a href="mailto:hugo.beauzee@datadoghq.com" target="_blank">hugo.beauzee@datadoghq.com</a>><br>
<br>
__cpp_lib_chrono only reaches the C++20 threshold when<br>
_GLIBCXX_USE_CXX11_ABI is set. But chrono::tzdb and the rest of the<br>
C++20 calendar/timezone API are also declared when<br>
_GLIBCXX_USE_DUAL_ABI is unset (old-ABI-only builds), the same<br>
condition already used throughout <chrono> and <bits/chrono_io.h>.<br>
<br>
Add a tier for that case in version.def, defining the macro to<br>
201803 (distinct from the full 201907 new-ABI value) so it reflects<br>
what's actually declared.</blockquote><div><br></div><div>What's missing though? The difference between 201803 and 201907 is the <a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1466r3.html">https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1466r3.html</a> paper, and that's not dependent on the new ABI, is it?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <chrono>'s own include guard for the<br>
headers tzdb needs can then go back to the plain __cpp_lib_chrono<br>
check.<br>
<br>
libstdc++-v3/ChangeLog:<br>
<br>
* include/bits/version.def (chrono): Add a 201803 tier for<br>
old-ABI-only builds.<br>
* include/bits/version.h: Regenerate.<br>
* include/std/chrono: Simplify include guard now that<br>
__cpp_lib_chrono accounts for old-ABI-only builds.<br>
<br>
Assisted-by: Claude (claude-sonnet-5)<br>
Signed-off-by: Hugo Beauzée-Luyssen <<a href="mailto:hugo.beauzee@datadoghq.com" target="_blank">hugo.beauzee@datadoghq.com</a>><br>
---<br>
libstdc++-v3/include/bits/version.def | 6 ++++++<br>
libstdc++-v3/include/bits/version.h | 5 +++++<br>
libstdc++-v3/include/std/chrono | 2 +-<br>
3 files changed, 12 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def<br>
index 9c523581c65..6db0d22b788 100644<br>
--- a/libstdc++-v3/include/bits/version.def<br>
+++ b/libstdc++-v3/include/bits/version.def<br>
@@ -624,6 +624,12 @@ ftms = {<br>
hosted = yes;<br>
cxx11abi = yes; // std::chrono::tzdb requires cxx11 std::string<br>
};<br>
+ values = {<br>
+ v = 201803;<br>
+ cxxmin = 20;<br>
+ hosted = yes;<br>
+ extra_cond = "!_GLIBCXX_USE_DUAL_ABI";<br>
+ };<br>
values = {<br>
v = 201611;<br>
cxxmin = 17;<br>
diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h<br>
index e0003054af6..07af61af056 100644<br>
--- a/libstdc++-v3/include/bits/version.h<br>
+++ b/libstdc++-v3/include/bits/version.h<br>
@@ -691,6 +691,11 @@<br>
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_chrono)<br>
# define __cpp_lib_chrono 201907L<br>
# endif<br>
+# elif (__cplusplus >= 202002L) && _GLIBCXX_HOSTED && (!_GLIBCXX_USE_DUAL_ABI)<br>
+# define __glibcxx_chrono 201803L<br>
+# if defined(__glibcxx_want_all) || defined(__glibcxx_want_chrono)<br>
+# define __cpp_lib_chrono 201803L<br>
+# endif<br>
# elif (__cplusplus >= 201703L) && _GLIBCXX_HOSTED<br>
# define __glibcxx_chrono 201611L<br>
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_chrono)<br>
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono<br>
index 4116f1c815e..ce0902522d7 100644<br>
--- a/libstdc++-v3/include/std/chrono<br>
+++ b/libstdc++-v3/include/std/chrono<br>
@@ -57,7 +57,7 @@<br>
# include <bits/stl_algo.h> // upper_bound<br>
# include <bits/range_access.h> // begin/end for arrays<br>
#endif<br>
-#if __cpp_lib_chrono >= 201803L // C++20 && HOSTED && USE_CXX11_ABI<br>
+#if __cpp_lib_chrono >= 201803L<br>
# include <sstream><br>
# include <string><br>
# include <vector><br>
-- <br>
2.43.0<br>
<br>
<br>
</blockquote></div></div>