RFC --enable-debugging

Benjamin Kosnik bkoz@redhat.com
Fri Nov 1 08:08:00 GMT 2002


>  1) Is there any automated way to have the compiler pick the debug
>     library when a program is linked with -g?

Don't think so. I think the (prefix)/lib/debug is pretty standard. I
know glibc uses it, and as Phil indicated, Debian has already started to
do this with libstdc++.

All I'm looking for is a way to easily build a debug C++ library. Right
now, I have to blow away the normal (optimized and
not-useful-with-a-symbolic-debugger) libstdc++ binary, and re-make with
CXXFLAGS="-g -O2". 

>  2) Does the compiler skip the debug version if -g is not given?

The compiler would skip the debug version entirely unless -L was given
to it.

>  3) Not everyone can install under /usr/lib/debug nor even desirable
>     in all circumstance.

I was thinking $prefix/lib/debug, not /usr/lib. Does that make more sense?

-benjamin



More information about the Libstdc++ mailing list