Hi,

Attached is an updated version of pr99832-distro.diff.  It fixes many
test failures on hppa but acats tests didn't run.

Test results for gcc-15.1.0-4 with this patch are posted here:
https://gcc.gnu.org/pipermail/gcc-testresults/2025-May/847808.html

Please review and install.

Regards,
Dave Anglin

-- 
John David Anglin  jda.par...@gmail.com
# DP: PR libstdc++/99832, std::chrono::system_clock::{from,to}_time_t:
# DP: Add ABI tag for timet64.

Index: gcc-15-15.1.0/src/libstdc++-v3/config/os/gnu-linux/os_defines.h
===================================================================
--- gcc-15-15.1.0.orig/src/libstdc++-v3/config/os/gnu-linux/os_defines.h
+++ gcc-15-15.1.0/src/libstdc++-v3/config/os/gnu-linux/os_defines.h
@@ -85,6 +85,13 @@
 // libpthread.
 #  define _GLIBCXX_GTHREAD_USE_WEAK 0
 # endif
+
+# if defined(_TIME_BITS)
+#  if _TIME_BITS == 64
+#   undef _GLIBCXX_TIME_BITS64_ABI_TAG
+#   define _GLIBCXX_TIME_BITS64_ABI_TAG [[__gnu__::__abi_tag__("__time64")]]
+#  endif
+# endif
 #endif // __linux__
 
 #endif
Index: gcc-15-15.1.0/src/libstdc++-v3/include/bits/c++config
===================================================================
--- gcc-15-15.1.0.orig/src/libstdc++-v3/include/bits/c++config
+++ gcc-15-15.1.0/src/libstdc++-v3/include/bits/c++config
@@ -720,6 +720,8 @@ namespace std
 # define _GLIBCXX_END_EXTERN_C
 #endif
 
+#define _GLIBCXX_TIME_BITS64_ABI_TAG
+
 
 // First includes.
 
Index: gcc-15-15.1.0/src/libstdc++-v3/include/bits/chrono.h
===================================================================
--- gcc-15-15.1.0.orig/src/libstdc++-v3/include/bits/chrono.h
+++ gcc-15-15.1.0/src/libstdc++-v3/include/bits/chrono.h
@@ -1244,6 +1244,7 @@ _GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2)
       now() noexcept;
 
       // Map to C API
+      _GLIBCXX_TIME_BITS64_ABI_TAG
       static std::time_t
       to_time_t(const time_point& __t) noexcept
       {
@@ -1251,6 +1252,7 @@ _GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2)
                           (__t.time_since_epoch()).count());
       }
 
+      _GLIBCXX_TIME_BITS64_ABI_TAG
       static time_point
       from_time_t(std::time_t __t) noexcept
       {

Reply via email to