Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

Michael Paquier <michael@paquier.xyz>

Commit: 12ff406f35b6da535f2011917b38c57e7f6a9540
Author: Michael Paquier <michael@paquier.xyz>
Date: 2019-02-03T08:48:59Z
Releases: 9.5.16
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk which
will be appended or prepended to the corresponding make variables.
Notably, there was previously no way to pass custom CXXFLAGS to third
party extension module builds, COPT and PROFILE supporting only CFLAGS
and LDFLAGS.

Backpatch all the way down to ease integration with existing
extensions.

Author: Christoph Berg
Reviewed-by: Andres Freund, Tom Lane, Michael Paquier
Discussion: https://postgr.es/m/20181113104005.GA32154@msg.credativ.de
Backpatch-through: 9.4

Files

PathChange+/−
doc/src/sgml/extend.sgml modified +28 −1
src/makefiles/pgxs.mk modified +13 −1

Discussion