From patchwork Sat Jun 22 20:24:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengdun Wang X-Patchwork-Id: 1951130 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=B0P2m1MG; 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 4W65NW3SfDz1ydW for ; Sun, 23 Jun 2024 06:26:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 757F2385DDDB for ; Sat, 22 Jun 2024 20:26:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10olkn20814.outbound.protection.outlook.com [IPv6:2a01:111:f403:2804::814]) by sourceware.org (Postfix) with ESMTPS id 3FC063858D39 for ; Sat, 22 Jun 2024 20:26:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3FC063858D39 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 3FC063858D39 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2804::814 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719087976; cv=pass; b=SAM+h2a0XTWOP+wSJl/Qpvdp9gp289a9jV/a6vhhuTG47fCpB1S0D8oqWrQDlmcvC/PZkcaIoMpEyGuES4Ip/5isSU/dllUfiyeB8kuxk49OAGmz1vqrVZ8PVAjV+Jhz8OAklE/+N7SyeOPwVac4nU3M0SQyJ31otKrrXbM8LjQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719087976; c=relaxed/simple; bh=pQSPVkQe+4CyttBUEn5T7c9+cTWkNOalru3oziteukI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mSGUMl5n3MgTLAcPcJL3pXeGG08ff2Km6Fo0HW69SqXt/J9TKVYb9dLrM0Bc0MwYZA8T12bBqoiBtg8wC6gi0GoGkLVOO5QOO0Fll7MdM6KxNlKiIJpD006BDBbMyLdAnhxkU+vBX7rXD4KxuKQXJiUIfr4pgsgtM09cxxp355I= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J/XtqqyggGETtJ/LqAelPpxWr3H1QLU345t/H4eBy9EM4ZHrYNFelOy2oEXcjhulVDrrY/eoPgkMRSZpFQJlxv1/VnDlNL6mnLEia0QbFbOCdWspQOqWfAE33TRRr4VFeuolOQi7Dd1iqQa53FwskvPGWs9EKIuJOt7g4OS7/wH4wSmszka2PzByPdZCyqvdH3xhcPN/nQ74Skb4+IM5MQ9e1y07v4HqNlWdQObc9XN9Hb/hkBVTy67vfviVjf+or/rF0Hh0L1kpvPV8LoaQak7Y8I+Duzyrof/j77TtHo+jl6fRNXHkWGH/aXnMn5VY0dK52GKpbl2J5o5wEjWY0A== 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=hkfHCaHVvQFwaXqyaXsyCYA553USqT7LynWtlL0vYFk=; b=B/Jho7KFD1GFe0xdBlcC12sJI3hwSjPs0mjv7GDb8dDH2y3aoh746RxoihquOpWutK5eBAH+mA0+hjMunarG+ieqFjJ47CnHUtiICH63b/xSMNJ27yVlpn+pvQFQ/h+6NuZ4CUvkHpFjoC3FjbZjAaIKlHqnGooAQWzc7WGYefGXlod6tB+cZx3+stZC48H3+tGG1YRvE5UhFzVNd0aM8qmuJAPKB+wrxOnLZVu8z45IVFp4Tip0ng2l8AGaPZir6g7z4FZrkG10fvJV/N1abfWOMP85Jlx8Z/yVqSniSsaAhPnFW/zT0RQyue1AB73gmvvM3+XifOKUIyTpYJZbDA== 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=hkfHCaHVvQFwaXqyaXsyCYA553USqT7LynWtlL0vYFk=; b=B0P2m1MGq7O2rJIMGNUhKE4GVt7DrxdSOiwgo7tZVo0LhreBlBmzu7m4GDdcaPTnpAWOLO7LgZEBQq7YA9KKcS5Ilv/XrVBo2BmkPXv+lhO7rpMbEY2ahb5K+WHI3KWl7WLxwNI4VOIbgbetF9SbA8JP1/N8ViztrGm4BY5kpll4QVj5bybAZs49HlgGT9BIvTin0/+JVB1OklTMPME4zLHEEeOvBGRJ5IrOlK7w0mgW7yTTptUsAFqVw1gTCC45EncwggKc7RE4GkdzOgSX1FR5t6Wh6duytkSz7VKndB9VhaQUEO0SngnlWbPL4BFsJdKCc8dP1NbjwxIhMrg63w== Received: from SA1PR11MB7130.namprd11.prod.outlook.com (2603:10b6:806:29f::10) by PH8PR11MB6855.namprd11.prod.outlook.com (2603:10b6:510:22c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.26; Sat, 22 Jun 2024 20:26:11 +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 20:26:11 +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 16:24:54 -0400 Message-ID: X-Mailer: git-send-email 2.45.2 X-TMN: [gbAciwC2RNpJ36vAW0pHhHIyUP1LXb+lXl33olvj7WE=] X-ClientProxiedBy: BL0PR05CA0013.namprd05.prod.outlook.com (2603:10b6:208:91::23) To SA1PR11MB7130.namprd11.prod.outlook.com (2603:10b6:806:29f::10) X-Microsoft-Original-Message-ID: <20240622202453.588511-2-euloanty@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA1PR11MB7130:EE_|PH8PR11MB6855:EE_ X-MS-Office365-Filtering-Correlation-Id: 86c5129a-a654-4eae-b954-08dc92f98e61 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199025|1602099009|440099025|3412199022|4302099010; X-Microsoft-Antispam-Message-Info: 6B633eJY5fMZHfMR9gXE/oc8+bUD3eLZIxGctwoW3QWmQJ0Du0TSudHYJP1bUwMuYTVG7GjuwGCiXCBCo9GL38m3Vp7kt5LqZ57usSbKY3ZYRaDAAiHiW61l/KVqlsVxe69d9rpHqCis8nvm93NlF9Eh2naJ6it0VQY83kR4RsxAs/8/cF+GsdLEFax4xsZ3pbXw/nHlVkd6auuMt67udoptLaBeH/apfU4QQOTOpn5obgRhX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nXsYQo8RuHupWyolDEEnBUIZgfz60cLhg8DGj55XhU7JY1fJGoSqvR40/eLjjtJj8+r0RPULPdk0niOs7U0ApoowwbGhoKDG+CurBDqz4fyux8SUe/VH2rR5hEnT2dDU79bnZSWr1IsXExaGOLGABf59BkRwffsGtGeFQXjp5HMYXIguqhncKV3p1IyqB1HQqKuJ3wmPyF0U3Qo12YejdALnP7ZWnrVmNgDozKiZEJY/q3qSaqJpQhOXSyFUtvDKeaNE5SNupkelkkSGQaWGN0pBpn5fRbKAksm4iPclnDxRUnIMy+uxJqpjPty1jJuBnRcMHiB/S25FxJTJHPBkKW4q2MrPIj4vRl7YNAl38JfwSwTj4L9cK61OOa0I5emYflHQJtTbtPqtUpy5xxOobPPpSL4JV66udYibN+/wQZ5nisYFh+1WeQUdyK9jPUXBp7avZ5VibZPBgq/lHv3jJf2d2Evt5Pq+xp6EtBYZwFpfiZ4hKxbuAwF3rdA6/Yt2Ic3iJBRgaPBuDxtqImtJbjP1nxEd1PY+nC5qgRhW2AfeLy4mzvf7VFVgwTc+vf1R1klH8Qa6GSR8UJJxaHPwwIzODSVEKap8gARXL1LlASFP1YdETQRnmB54jJwqyDbtNvhW/i2VWxVmLkfKWXULC6igzwOYknia3ZOMB9b7p2p0gYbVoW6kVLdDxHwG3Ua0So= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-e8f36.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 86c5129a-a654-4eae-b954-08dc92f98e61 X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB7130.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2024 20:26:11.4521 (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: PH8PR11MB6855 X-Spam-Status: No, score=-8.3 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 From: Shengdun Wang __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..8842bf85cee 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*, + [[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