From patchwork Wed Mar 16 21:24:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1606306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=o+erOrC6; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KJjyW5cVWz9sBy for ; Thu, 17 Mar 2022 08:26:43 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9FD6A395381E for ; Wed, 16 Mar 2022 21:26:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FD6A395381E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1647466001; bh=pkX9gaBtVx1E0NH4oTL7d76L72syeB3QU26WDk3VU4I=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=o+erOrC6xr+qSfZKPMBl1b8fHPdxsdocr7WK/z45iGGIHpz5zdISmkEViMDEG7zsI BIzKQ0f43Un1PVHcwIgRNj/4g7pgxIWWqY+Bt/9I0m/TiGwyPmfEqjft+UNe2YFbF8 Vx/xMYlqDibfDsRqs+FdCTpG/8aEVmtEZ+65yH8g= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 C0F4D39524AC for ; Wed, 16 Mar 2022 21:25:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C0F4D39524AC 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-649-I7XcEV3XOmy4vvzSJ3D0Kw-1; Wed, 16 Mar 2022 17:24:54 -0400 X-MC-Unique: I7XcEV3XOmy4vvzSJ3D0Kw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5566F101AA52; Wed, 16 Mar 2022 21:24:54 +0000 (UTC) Received: from localhost (unknown [10.33.36.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BB9D400F744; Wed, 16 Mar 2022 21:24:54 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix symbol versioning for Solaris 11.3 [PR103407] Date: Wed, 16 Mar 2022 21:24:53 +0000 Message-Id: <20220316212453.243636-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Cc: Rainer Orth Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Tested x86_64-linux and sparc-sun-solaris2.11 (but 11.3 only). Pushed to trunk. Rainer, this should allow you to continue omitting the _ZSt10from_charsPKcS0_R[def]St12chars_format symbols from the baseline, without the current FAIL. Please check on your other Solaris targets. -- >8 -- The new std::from_chars implementation means that those symbols are now defined on Solaris 11.3, which lacks uselocale. They were not present in gcc-11, but the linker script gives them the GLIBCXX_3.4.29 symbol version because that is the version where they appeared for systems with uselocale. This makes the version for those symbols depend on whether uselocale is available or not, so that they get version GLIBCXX_3.4.30 on targets where they weren't defined in gcc-11. In order to avoid needing separate ABI baseline files for Solaris 11.3 and 11.4, the ABI checker program now treats the floating-point std::from_chars overloads as undesignated if they are not found in the baseline symbols file. This means they can be left out of the SOlaris baseline without causing the check-abi target to fail. libstdc++-v3/ChangeLog: PR libstdc++/103407 * config/abi/pre/gnu.ver: Make version for std::from_chars depend on HAVE_USELOCALE macro. * testsuite/util/testsuite_abi.cc (compare_symbols): Treat std::from_chars for floating-point types as undesignated if not found in the baseline symbols file. --- libstdc++-v3/config/abi/pre/gnu.ver | 7 +++++++ libstdc++-v3/testsuite/util/testsuite_abi.cc | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index dedee8c1b0a..9b80a31768b 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -2337,8 +2337,10 @@ GLIBCXX_3.4.28 { GLIBCXX_3.4.29 { +#ifdef HAVE_USELOCALE # std::from_chars _ZSt10from_charsPKcS0_R[def]St12chars_format; +#endif # std::__istream_extract(istream&, char*, streamsize) _ZSt17__istream_extractRSiPc[ilx]; @@ -2416,6 +2418,11 @@ GLIBCXX_3.4.29 { GLIBCXX_3.4.30 { +#ifndef HAVE_USELOCALE + # std::from_chars + _ZSt10from_charsPKcS0_R[def]St12chars_format; +#endif + _ZSt21__glibcxx_assert_fail*; #ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.cc b/libstdc++-v3/testsuite/util/testsuite_abi.cc index 3dee737b2e5..5c8383554e5 100644 --- a/libstdc++-v3/testsuite/util/testsuite_abi.cc +++ b/libstdc++-v3/testsuite/util/testsuite_abi.cc @@ -499,6 +499,19 @@ compare_symbols(const char* baseline_file, const char* test_file, else undesignated.push_back(stest); } + // See PR libstdc++/103407 - abi_check FAILs on Solaris + else if (stest.type == symbol::function + && stest.name.compare(0, 23, "_ZSt10from_charsPKcS0_R") == 0 + && stest.name.find_first_of("def", 23) == 23 + && (stest.version_name == "GLIBCXX_3.4.29" + || stest.version_name == "GLIBCXX_3.4.30")) + { + stest.status = symbol::undesignated; + if (!check_version(stest, false)) + incompatible.push_back(symbol_pair(stest, stest)); + else + undesignated.push_back(stest); + } else { stest.status = symbol::added;