From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C9A443853553; Sun, 6 Nov 2022 16:16:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9A443853553 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667751410; bh=l55LAU4F6ehdG+GJvBGAKa3kW6bKP5j/oZY9ga9lUh8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E0NTlDKraPiR6X2umsfRUf1jsv5Qm5xb2OouX6JpZhmY4Ig/fCOHqaflujF6Dgss7 xNF2hkOhHbtz8/MOoInHZ93oeR78FGsL0FGM/BfJCbCPF/iPo/xuPyG/JoDlDlTxuK oojSZBKtLzcy1tPKhQQZBYW8d3jwa5O79pqNAAkc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/98108] Broken Schwarz counter for iostreams initialization Date: Sun, 06 Nov 2022 16:16:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98108 --- Comment #10 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:4e4e3ffd10f53ef71696bc728ab40258751a2df4 commit r13-3707-g4e4e3ffd10f53ef71696bc728ab40258751a2df4 Author: Patrick Palka Date: Sun Nov 6 11:16:00 2022 -0500 libstdc++: Move stream initialization into compiled library [PR44952] This patch moves the static object for constructing the standard streams out from and into the compiled library on systems that suppo= rt init priorities. This'll mean no longer introduces a separa= te global constructor in each TU that includes it. We can do this only if the init_priority attribute is supported because we need a way to ensure the stream initialization runs first before any user global initializer, particularly when linking with a static libstdc++.a. PR libstdc++/44952 PR libstdc++/39796 PR libstdc++/98108 libstdc++-v3/ChangeLog: * include/std/iostream (__ioinit): No longer define here if the init_priority attribute is usable. * src/c++98/ios_init.cc (__ioinit): Define here instead if init_priority is usable, via ... * src/c++98/ios_base_init.h: ... this new file.=