public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Fix --with-default-libstdcxx-abi=gcc4-compatible build
@ 2023-01-16 16:10 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-01-16 16:10 UTC (permalink / raw)
  To: libstdc++, gcc-patches

Tested x86_64-linux. Pushed to trunk.

-- >8 --

When building src/c++20/tzdb.cc we currently get a build error for
--with-default-libstdcxx-abi=gcc4-compatible because std::chrono::tzdb
and related types are not declared for the gcc4-compatible ABI (unless
--disable-libstdcxx-dual-abi is also used, so that the gcc4-compatible
ABI is the only one built).

Define _GLIBCXX_USE_CXX11_ABI in tzdb.cc so that for a dual-abi build we
always build it for the cxx11 ABI.

libstdc++-v3/ChangeLog:

	* src/c++20/tzdb.cc (_GLIBCXX_USE_CXX11_ABI): Define to 1.
---
 libstdc++-v3/src/c++20/tzdb.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc
index 2ce53d38768..20399b91e47 100644
--- a/libstdc++-v3/src/c++20/tzdb.cc
+++ b/libstdc++-v3/src/c++20/tzdb.cc
@@ -25,6 +25,9 @@
 // The -Wabi warnings in this file are all for non-exported symbols.
 #pragma GCC diagnostic ignored "-Wabi"
 
+// In the usual dual-abi build, std::chrono::tzdb is only defined for cxx11.
+#define _GLIBCXX_USE_CXX11_ABI 1
+
 #include <chrono>
 #include <fstream>    // ifstream
 #include <sstream>    // istringstream
-- 
2.39.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-16 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 16:10 [committed] libstdc++: Fix --with-default-libstdcxx-abi=gcc4-compatible build Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).