Tom Lane wrote:
> Greg Stark <gsstark@mit.edu> writes:
> > uh, since you asked. I think the logic is that, at least with gcc, -g
> > is never harmful since you can compile with -O and -g and then strip
> > later if necessary.
>
> Yeah, but ...
>
> > Does it still default to -g with compilers that
> > cannot do -O and -g together?
>
> *Yes*. This is exactly the problem, really. One could reasonably
> accuse the autoconf developers of FSF imperialism, because they have
> seen to it that autoconf-based configure scripts will choose non-optimal
> CFLAGS for non-gcc compilers. These same geeks would be screaming for
> Microsoft's blood if Microsoft tried comparable tactics, so I don't have
> a whole lot of sympathy.
>
> (Side note: I've been overriding this particular autoconf-ism in
> libjpeg's configure script since about 1995, so it's not like my
> antipathy to it is a new subject.)
>
> > Also, RMS happens to think all binaries should be installed with symbols. I
> > think he's seen far too many emacs bug reports where the user was unable to
> > provide any useful bug report because the binary was stripped.
>
> I hear where he's coming from, believe me. But RPM builds generally strip
> the binaries anyway, so autoconf isn't really accomplishing anything
> with this that I can see. The mass market won't be providing stack
> traces with their bug reports, whether the binary has symbols or not.
Also, -g is not the opposite of strip. A default compile adds function
name symbols. -g adds debug symbols, strip removes all symbols, so a
compile that uses -g and strip has fewer symbols than one that does a
compile without -g and without strip.
Also, I thought Peter advocated adding -g a few releases back. I didn't
agree, but I lost the vote, so I thought it was done. Were we
supresssing -g in older releases? Peter?
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square,
Pennsylvania19073