]> granicus.if.org Git - postgresql/commit
Allow CFLAGS from configure's environment to override automatic CFLAGS.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Jan 2015 16:08:13 +0000 (11:08 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Jan 2015 16:08:13 +0000 (11:08 -0500)
commit85a2a8903f7e9151793308d0638621003aded5ae
tree2c7b1fa18240fcf8bd059c835f9102623194c2e0
parentfd3d894e4ea0021efa2628e4dfc5fe0ed3071859
Allow CFLAGS from configure's environment to override automatic CFLAGS.

Previously, configure would add any switches that it chose of its own
accord to the end of the user-specified CFLAGS string.  Since most
compilers process these left-to-right, this meant that configure's choices
would override the user-specified flags in case of conflicts.  We'd rather
that worked the other way around, so adjust the logic to put the user's
string at the end not the beginning.

There does not seem to be a need for a similar behavior change for CPPFLAGS
or LDFLAGS: in those, the earlier switches tend to win (think -I or -L
behavior) so putting the user's string at the front is fine.

Backpatch to 9.4 but not earlier.  I'm not planning to run buildfarm member
guar on older branches, and it seems a bit risky to change this behavior
in long-stable branches.
configure
configure.in