Re: Still a few flaws in configure's default CFLAGS - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Still a few flaws in configure's default CFLAGS
Date
Msg-id 19031.1066314498@sss.pgh.pa.us
Whole thread Raw
In response to Re: Still a few flaws in configure's default CFLAGS  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_autovacuum and VACUUM FREEZE
Next
From: Rod Taylor
Date:
Subject: Re: pg_autovacuum and VACUUM FREEZE