On 21/11/2018 14:28, Christoph Berg wrote: > The context here is that we want to use the *FLAGS from pg_config for > compiling PG extension packages, but add additional *FLAGS from the > extension build environment. Merging the pg_config CFLAGS with the > environment CFLAGS seemed hard/weird/error-prone, so what we are doing > now is > https://salsa.debian.org/postgresql/postgresql-common/blob/master/pg_buildext#L53-55 > > if [ "${CFLAGS:-}" ]; then > export COPT="$CFLAGS" > fi
Note that pgxs supports PG_CPPFLAGS for adding custom pieces to CPPFLAGS in a safe way. Maybe we should add an equivalent for CFLAGS? It's just that it hasn't been needed so far. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services