From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id E9D7B3858D32 for ; Mon, 16 Jan 2023 16:10:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9D7B3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673885404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HiwbgFLp2RrbbMCp7yr4A0C37Xti3H0GAMs4c7K2oag=; b=A9SZtvCWHmBIITB39tqcIILKsLL8glXtHgNVcPZ+P4z2rNk0rJHmFpVXIafJ5yTCU0tsIJ K2eUB1gBwRIqF1qa5P/piWNZu9V3uBQ3ImP+FJGlUUowYshI/OO5nrjkzw9/niiHNPJSMj nRnT8sKYxcdYCE/ox2ITnzeHy35JUFo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-595-oAS8BDk1PaGUhK3BfSPqEw-1; Mon, 16 Jan 2023 11:10:03 -0500 X-MC-Unique: oAS8BDk1PaGUhK3BfSPqEw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 15B5C8828DA; Mon, 16 Jan 2023 16:10:03 +0000 (UTC) Received: from localhost (unknown [10.33.36.181]) by smtp.corp.redhat.com (Postfix) with ESMTP id D29CE492B13; Mon, 16 Jan 2023 16:10:02 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix --with-default-libstdcxx-abi=gcc4-compatible build Date: Mon, 16 Jan 2023 16:10:02 +0000 Message-Id: <20230116161002.40093-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 #include // ifstream #include // istringstream -- 2.39.0