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

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

Jan Wieck wrote:
> >> >> > What Peter was advocating in that thread was that we enable -g by
> >> >> > default *when building with gcc*. I have no problem with that, since
> >> >> > there is (allegedly) no performance penalty for -g with gcc. However,
> >> >> > the actual present behavior of our configure script is to default to -g
> >> >> > for every compiler, and I think that that is a big mistake. On most
> >> >> > non-gcc compilers, -g disables optimizations, which is way too high a
> >> >> > price to pay for production use.
> >> >>
> >> >> You do realize that as of now, -g is the default for gcc? Was that the
> >> >> intent?
> >> >
> >> > I was going to ask that myself. It seems strange to include -g by default ---
> >> > we have --enable-debug, and that should control -g on all platforms.
> >>
> >> Could it be that there ought to be a difference between the defaults of
> >> a devel CVS tree, a BETA tarball and a final "production" release?
> >
> > I am afraid that adds too much confusion to the debug situation. We
> > have a flag to do -g; let people use it if they want it.
> >
>
> Well, -g eats up some disk space, but for a gcc it doesn't need CPU
> cycles or anything else. I doubt many people who pay the horrible
> storage capacity overhead for PostgreSQL are that concerned about some
> extra symbols stored with their binaries, but let's not argue about that
> one.

Well, people are stripping the executable, so some of them must care.
In fact, if we enable -g by default for gcc, how do compile with default
symbols? We would need another configure option. Strip is not the same
as default symbols.

> The other compiler flags like -O are much more important because the out
> of the box configuration is the one we're allways blamed for. If it's
> too hard to teach autoconf the difference between gcc and non-gcc, then
> rip it.

Sure, we can do it, but it is a question of consistency.

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-10-27 15:34:15 Re: Duplicating transaction information in indexes and performing in memory vacuum
Previous Message Tom Lane 2003-10-27 15:22:32 Defaults for GUC variables (was Re: pg_ctl reports succes when start fails)