From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 597533854171; Sun, 6 Nov 2022 16:16:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 597533854171 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667751382; bh=KzybvP3mMgunYzV27OTnp8uuV+mwjkUVMhAUpAg3eLY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=n+NMr+tMo3p1ikN5rsjm7YsAnMkIE98Azxs7wRJ0iBTpa1ZqxxJme7PCM0z5Zn/Or lT2hu/QbvcZDx5KT/cB0uZ0ipPbQPL4r9omDIyfhNQOaBBc72MHKdzN1vPk/Njza8n XBWHdBS0B59Vjrtgtojh0ClrKXxMBuVzFNY3BoxA= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/39796] cin/cout/cerr constructors should run at high priority when possible Date: Sun, 06 Nov 2022 16:16:18 +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: 4.5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D39796 --- Comment #5 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.=