Kevin Brown wrote:
> Bruce Momjian wrote:
> > How does everyone like this patch?  It removes -g from non-debug
> > compiles, and changes -O2 to -O for FreeBSD/Alpha.
> 
> I'd be hesitant to remove -g from non-debug compiles.  If something
> crashes, it's useful to be able to get a good stacktrace from the
> resulting core file.  The -g option makes that possible for optimized
> code when compiling with gcc.
> 
> Is there any way we can have configure put -g in when it detects gcc?

Even without -g, you still get function names in the backtrace.  The
only time you don't get this is when you strip the executable.  -g adds
the function line number.  

configure --enable-debug will use -g for the compile, and with
optimization.  We aren't changing that, we are only preventing -g by
default.  Most installers are stripping the executables anyway --- this
might discourage them from doing that.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to