From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18569 invoked by alias); 19 Oct 2011 15:04:07 -0000 Received: (qmail 18559 invoked by uid 22791); 19 Oct 2011 15:04:06 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_CX,TW_DC,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-bw0-f47.google.com (HELO mail-bw0-f47.google.com) (209.85.214.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Oct 2011 15:03:49 +0000 Received: by bkat8 with SMTP id t8so2554297bka.20 for ; Wed, 19 Oct 2011 08:03:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.144.198 with SMTP id a6mr5218869bkv.9.1319036628293; Wed, 19 Oct 2011 08:03:48 -0700 (PDT) Received: by 10.205.115.138 with HTTP; Wed, 19 Oct 2011 08:03:48 -0700 (PDT) In-Reply-To: References: Date: Wed, 19 Oct 2011 15:04:00 -0000 Message-ID: Subject: Re: Compiling only libstdc++-v3 (with debugging symbols) From: Delcypher To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00179.txt.bz2 > It's hard to know what to say when you decide that the > documentation is wrong. =C2=A0I understand what you are trying > to do, but it is not supported. Sorry I didn't mean to offend. >> and the build fails. The output is shown here http://pastebin.com/p4iD7h= 4i > > The failure appears to be that you are compiling libstdc++ with a differe= nt > version of g++. =C2=A0In general you must build libstdc++ with the versio= n of > g++ that it is shipped with. =C2=A0libstdc++ includes non-standard code w= hich > is dependent on the specific version of the compiler. Okay I've found the correct source tarball that matches the version of g++ on my system. So now how do I go about building libstdc++ only the correct way with debugging symbols? Assuming `gcc-root' is the root source tree as before. Is running this correct? $ ../gcc-root/configure --enable-languages=3Dc++ --enable-libstdcxx-debug --prefix=3D$HOME/local Will the --enable-libstdcxx-debug option be accepted correctly even though it's being passed to ../gcc-root/configure rather than ../gcc-root/libstdc++/configure ? Assuming that's right do I run $ make all-target-libstdc++-v3 ? I found that make target by looking at the script that builds libstdc++-v3 for my distribution (Arch Linux). If that is the make target I need to build only libstdc++-v3 then maybe that should be in the documentation somewhere? > Many functions in libstdc++ are inlined from header files, and as such are > affected by the use of -g when you compile, rather than whether -g was > used when libstdc++ itself was built. =C2=A0Note that -D_GLIBCXX_DEBUG > does not affect whether debugging symbols are generated; it produces > a debugging version of the code which adds runtime checks to make > sure that functions are being used correctly. That's good to know. Thanks for the very informative reply. All the best, Dan.