This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++ debug option


On 2013-12-04 17:03, Jonathan Wakely wrote:
On 5 December 2013 00:22, Oleg Smolsky wrote:
Hi all, I have a question about the |--enable-libstdcxx-debug option - do I
need to pass it to the configure script in order to use the debugging
features?
No.  That option causes a second set of libstdc++ libraries to be
built with (by default) CXXFLAGS="-O0 -g" and installed to
${libdir}/debug so that you can use LD_LIBRARY_PATH to use those
unoptimized libs if you want to step through libstdc++ code in GDB, it
does not affect the availability of any features.

See http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html#debug.req

Oh, I see. Thank you for the clarification! I already forcefully specify the location of libstdc++ via -rpath, so I can easily point to the debug variant for our debug builds.

Two more questions, if you don't mind:
  - does the debug build work with _GLIBCXX_DEBUG?
  - would a dynamically linked program work against both the debug build
    of libstdc++ and the normal optimized one? (ie via multiple -rpath
    settings that would fit either dev or production machines)

Oleg.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]