Re: Still a few flaws in configure's default CFLAGS selection

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Still a few flaws in configure's default CFLAGS selection
Date: 2003-10-16 17:47:10
Message-ID: 200310161747.h9GHlAF26528@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Greg Stark <gsstark(at)mit(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-10-16 17:53:48 Re: elog tab indentation
Previous Message Bruce Momjian 2003-10-16 17:41:22 Re: Some thoughts about i/o priorities and throttling vacuum