From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24360 invoked by alias); 10 Feb 2012 12:31:25 -0000 Received: (qmail 24347 invoked by uid 22791); 10 Feb 2012 12:31:24 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Feb 2012 12:31:11 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/52188] [4.7 regression] IPA-CP change broke libstdc++ symbol versioning on Solaris Date: Fri, 10 Feb 2012 12:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg01065.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52188 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek 2012-02-10 12:30:39 UTC --- The bug was that the gnu.ver wildcards were too generic and thus matched even something that wasn't intended to be exported and just happened to be exported as an implementation detail. This caused a problem on Linux several years ago (I think in 2005), and since then these are forcefully exported from compatibility.cc: /* gcc-3.4.4 _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv */ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template istreambuf_iterator& istreambuf_iterator::operator++(); #ifdef _GLIBCXX_USE_WCHAR_T template istreambuf_iterator& istreambuf_iterator::operator++(); #endif _GLIBCXX_END_NAMESPACE_VERSION } // namespace but not on Solaris, because it either doesn't support GNU symver, or doesn't have corresponding runtime support. I think the bug is not on the optimization side, it is fine if the optimizations change stuff that are implementation details, C++ isn't a very good language for ABI stability and just requires lots of work on the libstdc++ side to preserve at least some. So, I'd say it is time to preprocess the *.ver files and tweak them based on target OS or its version, and additionally you'll want (for Solaris) enable the above hunk (sans the following stuff), to make sure it doesn't go again when the optimizers change.