]> gcc.gnu.org Git - gcc.git/commitdiff
libstdc++: Fix --with-default-libstdcxx-abi=gcc4-compatible build
authorJonathan Wakely <jwakely@redhat.com>
Mon, 16 Jan 2023 15:52:20 +0000 (15:52 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 16 Jan 2023 16:09:42 +0000 (16:09 +0000)
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

index 2ce53d387687aad50b5603ca2b0e4d35857140bc..20399b91e470efe7385dc1360ea8f896bf653b72 100644 (file)
@@ -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
This page took 0.058556 seconds and 5 git commands to generate.