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

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

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Tom Lane writes:
>> [ griping about autoconf's default choices for CFLAGS ]

> The philosophy of the autotools is to give power to the experienced user
> (you can set your own CFLAGS) and to give portable defaults to everyone
> else (-O is technically not portable).

It'd be nicer if they had tried to give *useful* defaults to everyone else.
The existing behavior is reasonable for people testing beta-quality
software, but it's not a helpful choice for production code. It's great
that someone who knows what they're doing can override it, but right now
I'm concerned with the default build behavior for people who don't know.

> Another contributing factor is
> that the default stems from a different era, one might say, and has been
> the same for a long time, and changing it now would probably upset as many
> people as it would please.

FWIW, I've been overriding the default CFLAGS to be -O for non-gcc in
libjpeg's configure script since [...digs...] release 6b of March 1998.
I've yet to hear any complaint about it, and that code is used on a much
wider variety of systems than Postgres runs on. So my opinion is that
-O is perfectly portable and unlikely to upset anyone for production
code --- especially when configure advertises a switch to select -g
instead.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2003-10-16 14:31:45 Re: Database Kernels and O_DIRECT
Previous Message Rod Taylor 2003-10-16 14:16:42 Re: pg_autovacuum and VACUUM FREEZE