This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] specs changes for libstdc++ debug mode
- From: Matt Austern <austern at apple dot com>
- To: Doug Gregor <dgregor at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Tue, 15 Jul 2003 13:19:31 -0700
- Subject: Re: [PATCH] specs changes for libstdc++ debug mode
On Monday, July 14, 2003, at 05:02 PM, Doug Gregor wrote:
Here's the patch that enables linking against libstdc++-debug (the
libstdc++ debug mode library).
Tested on i686-pc-linux-gnu and powerpc-apple-darwin; no regressions.
ChangeLog follows.
Okay to commit?
Doug
2003-07-14 Doug Gregor <dgregor@apple.com>
* g++spec.c (lang_specific_driver): Link against -lstdc++-debug
when we've seen -D_GLIBCXX_DEBUG.
Stupid question: is there any other place in the compiler where we
change
the behavior of the driver based on whether the user defines a special
macro?
If so, if we're just carrying on with something we've done already, then
I don't have a problem with this. If not, then I'm a bit uncomfortable
with it. -D is documented to define a macro. Having it do other things
as well, for special macros, strikes me as non-obvious.
Instead of overloading -D... as a compiler flag, perhaps it would be
clearer to define a new -f flag explicitly.
(Again, I withdraw my objection if there are already macros where -D...
changes the compiler behavior. My only concern is that users might find
this surprising. If that's the way things work already, then my concern
is irrelevant.)
--Matt