From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: dpa-postgres@aegee.org, Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14217: Respect $CFLAGS from /usr/local/etc/config.site
Date: Tue, 28 Jun 2016 12:05:43 -0400
Message-ID: <21138.1467129943@sss.pgh.pa.us> (raw)
In-Reply-To: <20160628153309.GA23675@alvherre.pgsql>
References: <20160628153309.GA23675@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> dpa-postgres@aegee.org wrote:
>> configure generated by Autoconf loads the file $prefix/etc/config.site and
>> if CFLAGS is defined there, its value is used when building the project.
>> Because in postgresql configure.in contains on line 400 "unset CFLAGS" the
>> value of $CFLAGS from config.site is discarded when building postgresql,
>> contrary to $LDFLAGS from config.site.
> The way it works today completely ignores settings in config.site, which is
> clearly bogus per the above manual, but I doubt that blanket removal of the
> "unset" is the right solution.
I think the thing we'd have to work out is what's the proper interaction
between the template files and the config.site file. It's worth noting
that most of the cases where template files set CFLAGS are when we've
detected a non-default compiler. In such cases, it's not exactly clear
to me that honoring CFLAGS from config.site would be helpful, as such a
setting probably is meant for the default compiler.
Another point here is that any setting coming from config.site is
presumably not going to vary in response to --enable-debug, which
could be problematic, especially so for non-gcc compilers.
Also, it looks to me like the autoconf script will fail outright if
config.site specifies CFLAGS and the user has tried to specify a
different CFLAGS in the environment or command line --- see the
logic that checks for cache file corruption.
In short, I'm pretty dubious about the utility of this feature, which
may explain why nobody has complained about our current behavior
for over a dozen years. Still, it *is* inconsistent that we are
only discarding CFLAGS and not other variables that might come from
such a file.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, peter_e@gmx.net
Subject: Re: BUG #14217: Respect $CFLAGS from /usr/local/etc/config.site
In-Reply-To: <21138.1467129943@sss.pgh.pa.us>
References: <20160628153309.GA23675@alvherre.pgsql> <21138.1467129943@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox