From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22978 invoked by alias); 21 Nov 2012 11:20:29 -0000 Received: (qmail 22162 invoked by uid 48); 21 Nov 2012 11:20:00 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/54630] [4.8 Regression] GCC 4.8 --enable-languages=c build fails: Undefined symbols: ___cxa_guard_acquire and ___cxa_guard_release Date: Wed, 21 Nov 2012 11:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Severity 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-11/txt/msg02021.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54630 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |normal --- Comment #16 from Jonathan Wakely 2012-11-21 11:19:54 UTC --- When LINKER=$(CXX) you do not "link with a C++ compiler" you still link with the linker, ld, but the g++ driver passes it additional libs including -lstdc++. That means you can't fine-tune which libstdc++ is used, defeating the purpose of --with-host-libstdcxx. To allow fine-tuning the libs, you need the additional libs to not be used, which implies not linking with g++. If you use --with-host-libstdcxx then you need to get the argument right. (In reply to comment #8) > After that, I'll try to use a newer GCC on CentoS Linux i386 and try again with > --with-host-libstdcxx='-static-libgcc -static-libstdc++ -lm'. This seems to be > the more modern equivalent on more recent gcc/g++ compilers. No, it's not equivalent, -static-libstdcxx does not imply -lstdc++, which is why you get missing symbols. Why not just use the Sourcery configuration that works?