From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 73E303858CDB; Mon, 16 Jan 2023 16:09:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73E303858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673885389; bh=p2I1zMnRc5Sywjaj25M6yxYeTIF1PizianA3BrOOKJQ=; h=From:To:Subject:Date:From; b=sjjWDdr/j3iMBv8d6bvTxrl82GaI5mWf0+kHxaWHltgOfMKYjEkdaf67D+3aQnHCK 8Csxp9d3n+iPiVvGNhFho+nqSvblQFWM4jcd9xaV0x4lBiHvivMG8yB8qZWoDIM+CM Q5yladltmUhZ2qDI9mvWpnjD9p/G4eiApkd3uV+M= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-5214] libstdc++: Fix --with-default-libstdcxx-abi=gcc4-compatible build X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: b22634281fff352fcf71dd4fbbf6e6fcbc9a46cf X-Git-Newrev: d694a3d57535fbb3737dd583b15b69e0845a5846 Message-Id: <20230116160949.73E303858CDB@sourceware.org> Date: Mon, 16 Jan 2023 16:09:49 +0000 (GMT) List-Id: https://gcc.gnu.org/g:d694a3d57535fbb3737dd583b15b69e0845a5846 commit r13-5214-gd694a3d57535fbb3737dd583b15b69e0845a5846 Author: Jonathan Wakely Date: Mon Jan 16 15:52:20 2023 +0000 libstdc++: Fix --with-default-libstdcxx-abi=gcc4-compatible build 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. Diff: --- 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 #include // ifstream #include // istringstream