From patchwork Sat Jun 22 21:11:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengdun Wang X-Patchwork-Id: 1951133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=live.com header.i=@live.com header.a=rsa-sha256 header.s=selector1 header.b=oIn3odcf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W66PL5nYZz20Wk for ; Sun, 23 Jun 2024 07:12:19 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 39F53385DDCF for ; Sat, 22 Jun 2024 21:12:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10olkn20812.outbound.protection.outlook.com [IPv6:2a01:111:f403:2c12::812]) by sourceware.org (Postfix) with ESMTPS id DD56D3858416 for ; Sat, 22 Jun 2024 21:11:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD56D3858416 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=live.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=live.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DD56D3858416 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2c12::812 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719090719; cv=pass; b=Ul2tmJZkTicatrKy2p4s4leR1zezpg5dyLqx/VT//l0znQHVRWVCPMYocaVbPwVsln54heZzyGudiDmr0Kz3IehCh9g4FCyaKD614mHUmQZnx+Q6ParwV2EgxsTS93ayxkJeYOOVSUFI13RraXrzlny2cMh24eGuQ0xEezLOG/8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719090719; c=relaxed/simple; bh=wmk6qFQNoKdBI2IqWorsMqCwsMbLfmTqEktO28QeXk0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kNKpNLzOEIjCxiN7c0hqQB62Q8Kb9QwqwCDuLJioaOTBPNhZ0FK90bVTcJNy5+AMMxD+RCTpV2aRbaFZpzoC3eVbLwxWBJsX4u+hfYfXsEWeK8I289aQ4rbYqSIYJB623ffyjnnXKJ7WKZLiWOzNEvatz8gQYdN1IUj7YOYeOdk= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L8mv1lBSFBPp5OLZB9Tq6qj2xCyg03p7rUbnHcLg6dCG3b84Z58Iwvj24zgN0rd3VGbhcEleRYsLkhyYvmZc15mah6puWSDLTdyJM8zB8uCAe2o2xrH6p3rACp5hYGtC75Dq6ccnyZt85DrCWHBQo6LSzs/bXO4uVS+9MECKOuhVABui72SfMU14kGCmxrrkMx25nOr0uAQnKKrh4Mb4W8nI3Fga0WNX0gcTWhQOLFWKW3jizONird2WvjvBDylk2FXlSD3uxgXWtmQcnjmkvUbi+jukWr2YozcNus4DBLTJZ1YyLlWOQnD91grwutMlLSuPeP8WDqCg1qM2RuW9cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wpB2km0sdYLJj3qkNW4DTK3o9Ym0luppo0JAf7cOUcI=; b=LuC7VtHDKjdhUegUyxrEhMMe1SgmFRrIkM+Ic7R8BtXTJtrspi1of4Gi7MAD5fEK1LDGkrQW/1FZeTjlBogNPbTxLS7rZR6yt4D8w7KXe5VHfjQrrR5+NBVzcIhfDNMrZ0whlIjPo9OxlOTIAb76u6Bq634JqZ1i8tWj/RWAuMBu5ozoDS1FFu7oemGV3PO4BuvREh/LrbRxw7K7e6NB/+VS2HI8xos5/qnaDjYkg+cyEYatHPEfrmkPvP0AzKivK3FEjnnDiqTgZQyEhiorjCSroUdkTZOsBv4ussycQAcQCLuTOfMPXXCJs0oe30tV4DAKnULDIkeMbpHkjK9ngQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wpB2km0sdYLJj3qkNW4DTK3o9Ym0luppo0JAf7cOUcI=; b=oIn3odcfnQuENDF2L/4WBH5rTeePN5EvU5r2pgADmQTf/0pfmLrkuyXN92UKLArMjUT8x0cgLrCRtBkDcQL9AXHoeQrCyQqPynmRQe1Ycobv+13shNQpdiUczSRNimNJK/G0sREHwOIMZJMm3rFxHElL9Chr1nGDSaunJf79azo21jNOIEpOaCtv3iDyXY6Nd5mcZQ5fCQdTgS6SPvAzpeHUc0IIFVXXbqUVMYKvmjsl1e9fWbleU9c4xMnN+qN88D6wdkLHD7SYYhyMXXHl75wJcmXM0xdCCh0etJ+nNagt580jNnqOhxo4t3nKHEa2s92VI69tlxh8kaL3Iovrzg== Received: from SA1PR11MB7130.namprd11.prod.outlook.com (2603:10b6:806:29f::10) by PH7PR11MB6771.namprd11.prod.outlook.com (2603:10b6:510:1b5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.21; Sat, 22 Jun 2024 21:11:51 +0000 Received: from SA1PR11MB7130.namprd11.prod.outlook.com ([fe80::928e:8882:8562:2dd5]) by SA1PR11MB7130.namprd11.prod.outlook.com ([fe80::928e:8882:8562:2dd5%5]) with mapi id 15.20.7698.025; Sat, 22 Jun 2024 21:11:51 +0000 From: Shengdun Wang To: gcc-patches@gcc.gnu.org Cc: Shengdun Wang Subject: [PATCH] libstdc++: Fix --disable-libstdcxx-verbose abi break [PR115585] Date: Sat, 22 Jun 2024 17:11:13 -0400 Message-ID: X-Mailer: git-send-email 2.45.2 X-TMN: [ZurVLWxtxkjS2hAxCj5hbQZ1HSthX8kQVnTjHBNXbGI=] X-ClientProxiedBy: BL0PR0102CA0005.prod.exchangelabs.com (2603:10b6:207:18::18) To SA1PR11MB7130.namprd11.prod.outlook.com (2603:10b6:806:29f::10) X-Microsoft-Original-Message-ID: <20240622211113.589197-1-euloanty@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB7130:EE_|PH7PR11MB6771:EE_ X-MS-Office365-Filtering-Correlation-Id: 356f1f18-df4c-465e-9eb7-08dc92ffef86 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199025|4302099010|3412199022|440099025|1602099009|1710799023; X-Microsoft-Antispam-Message-Info: 3UbD+jvXhO4MbJ0QjrOgcWvqcHzycPjXEaIZqo0xNRF4lZgxrKlirSYFVMw1xTNYEwJ+z7Qd2wlF5epBZmoDp+zfqNy9WMvB/q0/ODzIpcXQdV8FQAs6Tvoxt5UvMDpthFUePbdvn4UA0Arwra3rsY+QUUfP0015U2x/ev6QvhDEXqHZ3bM8L5KSSuLJ7UoJP7ZFUTij6z/d/HIKMdRAWA5B+uWAB8DhGZbV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ywUrp9/FgKdCGpPEQaxXQXu2RXLJyaAPyQTta4lMhYsEEUXVCb3FjYAflGF45AfIDnGsffxvnYyhl2nIYEXw17g3PCZGz3hdZnxRtk9q52h+CzGIugoVSFbY/a6zYvHm/mNbJQdAAYKfag2q6yR28VDKZFrKrsxoBuNj6wihxQgoF4A7TONrzQr7MtNrzp5HIQ1UDHgeSGzks3mpqllea7gNH6pib/2LClnl/8RO3RBS1+Imxg7rwtVCuvf0DGQfsNMLomIcy43rBLuoKCJNR+W1CEhAkpRhBvxqejagOkiVC6fgUzEtCoJ/YkqDHJ0if+MXlT4WyBOKJAcm70DFTyxe2Tmvdphcn1zhneDS0lEiCdSmDmD6Y1bAZ0AUUIkckqMkQP+HAEBkmYw0jItwR7R7G8mBl4AInx1ApcweJ6sgvAoHLPT9M1H84I+ixRMkKxAXgxL/lGse58ikcGYX6M+2EHRaNcLjHx80xB3bhesMclPzMIvyex1VVCosG3DaY1NByxZizXi0M9blv12bV3PQDc0UdCiSSZ41qb1TiyUVmlxsvvNbpyCDGKl0pOuZ3Duu4tHCV0D6PUn/1GddQIoln4Uq6hKydgrGtN+TQxub7OYqlmeGQGRK5h6/0hV5V1ZetpACN5iJof3rhzA/FnlXYetQrmN/reOvBkkXOKrhfq8Uq29LYL8aHO/N21dzUSMV8xArHar/EICXQ9zcZjXNWw7mJIucrDgl5WowJMF3E= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-e8f36.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 356f1f18-df4c-465e-9eb7-08dc92ffef86 X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB7130.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2024 21:11:51.4288 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6771 X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org __glibcxx_assert_fail is not defined when we disable the libstdcxx-verbose. This causes ABI break when a binary is compiled with verbose enabled. libstdc++-v3/ChangeLog: * src/c++11/assert_fail.cc: --- libstdc++-v3/src/c++11/assert_fail.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/src/c++11/assert_fail.cc b/libstdc++-v3/src/c++11/assert_fail.cc index 6d99c7958f3..930cabd5ee6 100644 --- a/libstdc++-v3/src/c++11/assert_fail.cc +++ b/libstdc++-v3/src/c++11/assert_fail.cc @@ -22,23 +22,28 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . +#include +#ifdef _GLIBCXX_VERBOSE_ASSERT #include // for std::fprintf, stderr +#endif #include // for std::abort -#ifdef _GLIBCXX_VERBOSE_ASSERT namespace std { [[__noreturn__]] void - __glibcxx_assert_fail(const char* file, int line, - const char* function, const char* condition) noexcept + __glibcxx_assert_fail( [[maybe_unused]] const char* file, + [[maybe_unused]] int line, + [[maybe_unused]] const char* function, + [[maybe_unused]] const char* condition) noexcept { +#ifdef _GLIBCXX_VERBOSE_ASSERT if (file && function && condition) fprintf(stderr, "%s:%d: %s: Assertion '%s' failed.\n", file, line, function, condition); else if (function) fprintf(stderr, "%s: Undefined behavior detected.\n", function); +#endif abort(); } } -#endif