On 2015-10-28 09:36:39 -0400, Tom Lane wrote:
> Andres Freund <and...@anarazel.de> writes:
> > I rather regularly want to pass extra flags to configure without
> > overwriting CFLAGS. There's two basic reasons:
> > 1) ./configure CFLAGS=... essentially breaks --enable-debug and related
> >    options, overwrites -O2 as the default and such. That's imo pretty
> >    confusing.
> > 2) I like to be able to pass -Werror or something to configure without
> >    breaking a bunch of configure tests that won't work with Werror.
> I would be rather surprised if such a switch didn't affect the flags used
> by configure itself, so your point (2) seems like it would require nasty
> inconsistency.

Hm, I don't find it that inconsistent to say that configure itself uses
CFLAGS but not EXTRA_CFLAGS (or whatever).

> Why don't you just edit Makefile.global after configure finishes?

I personally do, and it's not a problem for me because I call configure
and everything from scripts anyway. But it's harder to to tell people
that. It's e.g. much easier to tell people that they should add one
argument to configure to specify -fno-omit-frame-pointer rather than
having to create Makefile.custom or something like that.

Makefile.custom doesn't, afaik, won't forward the cflags to PGXS built
extensions. Which then is annoying for flags like

> Or use COPT or PROFILE?

If we'd persist COPT or PROFILE when specified for configure that'd work
for me as well.


Andres Freund

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

Reply via email to