Hi Tom,

On 2015-01-13 22:19:30 -0500, Tom Lane wrote:
> Would anyone object to modifying configure.in like this:
>  
>  if test "$GCC" = yes -a "$ICC" = no; then
> -  CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
> +  CFLAGS="-Wall $CFLAGS -Wmissing-prototypes -Wpointer-arith"
>    # These work in some but not all gcc versions
>    PGAC_PROG_CC_CFLAGS_OPT([-Wdeclaration-after-statement])

I'd actually vote for moving $CFLAGS - no point in not allowing
everything to be overwritten/overruled.

> The reason I got interested in this is that I attempted to pass in
> "CFLAGS=-Wno-format" to configure, to suppress format warnings on
> buildfarm member gaur (whose gcc is too old to recognize z modifiers).
> That doesn't work because -Wall turns the warnings right back on again.
> If the user-supplied CFLAGS were inserted after -Wall then it would work.

In the line of
http://archives.postgresql.org/message-id/54B58BA3.8040302%40ohmu.fi in
wonder if the better fix isn't to define pg_format_attribute(...) and
define it empty that if the compiler doesn't support what we want.

> A slightly more complicated change could be applied to make sure that
> *all* of the CFLAGS forcibly inserted by configure appear before any
> externally-sourced CFLAGS, allowing any of them to be overridden from the
> environment variable.  I'm not sure if it's worth the trouble to do that,
> but if there's interest I could make it happen.

I think it'd be good idea, but unless you're enthusiastic I guess there
are more important things.

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to