BUG #2072: CPPFLAGS clobbered

Started by Keith Randallover 20 years ago2 messagesbugs
Jump to latest
#1Keith Randall
randallk@gmail.com

The following bug has been logged online:

Bug reference: 2072
Logged by: Keith Randall
Email address: randallk@gmail.com
PostgreSQL version: 8.1.0
Operating system: Linux
Description: CPPFLAGS clobbered
Details:

In src/template/linux the
CPPFLAGS="-D_GNU_SOURCE"
overrides command-line CPPFLAGS
I change it to
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
and am back in business.

Keith

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Keith Randall (#1)
Re: BUG #2072: CPPFLAGS clobbered

"Keith Randall" <randallk@gmail.com> writes:

In src/template/linux the
CPPFLAGS="-D_GNU_SOURCE"
overrides command-line CPPFLAGS
I change it to
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
and am back in business.

That's pretty much entirely the wrong way to fix it; or at least it's
inconsistent with the way we handle CFLAGS etc, and doing it this way
would require touching every template not only linux.

I'm thinking that configure.in should handle template CPPFLAGS settings
the same way it handles CFLAGS, ie, command line settings override the
template. Probably LDFLAGS too.

BTW, why do you feel a need to override CPPFLAGS in the first place?

regards, tom lane