From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Minor configure tweak to simplify adjusting gcc warnings |
Date: | 2015-01-14 03:19:30 |
Message-ID: | 6332.1421205570@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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])
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.
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.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2015-01-14 03:42:57 | Re: Parallel Seq Scan |
Previous Message | Ali Akbar | 2015-01-14 02:04:08 | Re: Add generate_series(numeric, numeric) |