From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30225 invoked by alias); 5 Sep 2012 21:35:28 -0000 Received: (qmail 30216 invoked by uid 22791); 5 Sep 2012 21:35:27 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_GJ,TW_LG 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; Wed, 05 Sep 2012 21:35:15 +0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/28718] Call to -lgcc added prior to user libraries Date: Wed, 05 Sep 2012 21:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed CC Resolution Ever Confirmed 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-09/txt/msg00407.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28718 Georg-Johann Lay changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |NEW Last reconfirmed| |2012-09-05 CC| |gdr at gcc dot gnu.org Resolution|DUPLICATE | Ever Confirmed|0 |1 --- Comment #14 from Georg-Johann Lay 2012-09-05 21:35:00 UTC --- CCing Gaby. He is the only one I know of who is committed to C++ and avr. (In reply to comment #13) > All this is fighting the symptoms though. > > My point (as outlined in comment #8) is: > > When operating as a C compiler, *all* user-supplied libraries are passed > to the linker *first*, followed by system libraries. > > When operating as a C++ compiler, libstdc++ and libm.a are passed *before* > any user-supplied library. This leaves the users in a situation where > they are no longer able to supply own overrides for some functions in > system libraries. Again, all this is in contrast to how the C compiler > works. > > In the AVR case, the situation is only worse since there's no libstdc++ > (yet), and somehow, libgcc is substituted in place of libstdc++ (which I > think is a completely flawed idea from the beginning). > > So despite all the artefacts which leaded to this bug report, I think at > least the last point mentioned is worth fixing: if there's no libstdc++, > there's no point in trying to pretend libgcc could be supplied as a > replacement for libstdc++. (The AVR-related artefacts are now mostly > fixed after Johann's recent work, the original bug(s) remain(s).) Ok, I untied the two PRs again and set this one to NEW.