This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs build report
- To: Tom Holroyd <tomh at taz dot ccs dot fau dot edu>
- Subject: Re: egcs build report
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 18 Jun 1998 22:08:17 -0600
- cc: Joe Buck <jbuck at synopsys dot com>, Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.LNX.3.96.980619105856.5081A-100000@bhalpha1.nibh.go.jp>you write:
> >I don't want to suddenly get lots of mail from folks who can't debug
> >their code (because someone installed a libstdc++ with no debug symbols).
>
> Actually, this is a good point. Although I don't know why c++ debugging
> requires library symbols (I can debug my C code even though I can't step
> into strcpy (why would I want to?)).
For example, you can't look at the internals of any classes defined in
the library.
As someone that used to put together binary releases, I got my hand
slapped more than once for building the C++ runtime libraries without
debug symbols :-)
> But the compiler itself surely
> doesn't need -g to run. Perhaps some selectivity is called for.
Users can change BOOT_CFLAGS to modify which are flags are used during
the build. They can also install stripped (or just debug stripped)
binaries if they desire (it's more complicated, but possible).
> As long as we're on this, could somebody please satisfy my curiosity about
> this: does -g impact the performance of -O? In some compilers, -g turns
> -O off, and that's mostly why I don't use it (unless I specifically want
> to run gdb). But what's the story with gcc/egcs?
-g has no impact on the generated code. This has been a policy set in
stone for many years. If you ever encounter a case where -g changes the
generated code, it would be considered a bug.
jeff