From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ADB5E3858288; Mon, 29 Apr 2024 14:19:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADB5E3858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714400340; bh=ReHmD9O/u5ouq1uD6iXrVvdu9pDsMk7cFAOmpjTjjAk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=amAvZO2myBxnkbo65CLicqGSP0hwoEDeUlqraeo6OdAJmO6fJp/ssKs73mbtPhdYT 67AzMMQlI6ZEWLnrphmAvrxhweSBoQsacKKhNAaKwOmNy8TCe1iHEHkMvCPRHqqG7h 43jz6Q/NjUrzSW/iaE3L8e559KkFebSn6x5KnvXY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112397] Two persistent libstdc++ test failures on x86_64-apple-darwin Date: Mon, 29 Apr 2024 14:18:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal 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=3D112397 --- Comment #14 from GCC Commits --- The releases/gcc-11 branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:8c19cb9c6186b65f1858c91d423238a00ffe0c01 commit r11-11403-g8c19cb9c6186b65f1858c91d423238a00ffe0c01 Author: Iain Sandoe Date: Thu Feb 8 17:54:31 2024 +0000 libstdc++, Darwin: Handle a linker warning [PR112397]. Darwin's linker warns when we make a direct branch to code that is in a weak definition (citing that if a different implementation of the weak function is chosen by the dynamic linker this would be an error). As the analysis in the PR shows, this can happen when we have hot/ cold partitioning and there is an error path that is primarily cold but makes use of epilogue code in the hot section. In this simple case, we can easily deduce that the code is in fact safe; however that is not something we can realistically implement in the linker. Since the user-replaceable allocators are implemented using weak definitions, this is a warning that is frequently flagged up in both the testsuite and end-user code. The chosen solution here is to suppress the hot/cold partitioning for these cases (it is unlikely to impact performance much c.f. the actual allocation). PR target/112397 libstdc++-v3/ChangeLog: * configure: Regenerate. * configure.ac: Detect if we are building for Darwin. * libsupc++/Makefile.am: If we are building for Darwin, then suppress hot/cold partitioning for the array allocators. * libsupc++/Makefile.in: Regenerated. Signed-off-by: Iain Sandoe Co-authored-by: Jonathan Wakely (cherry picked from commit 1609fdff16f17ead37666f6d0e801800ee3d04d2)=