From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add EXTRA_CFLAGS to configure |
Date: | 2015-10-28 14:26:20 |
Message-ID: | 20151028142620.GI29811@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2015-10-28 09:36:39 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)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
-fno-omit-frame-pointer.
> Or use COPT or PROFILE?
If we'd persist COPT or PROFILE when specified for configure that'd work
for me as well.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Moran | 2015-10-28 14:27:25 | Is there any ordering to the values in guc.c? |
Previous Message | Robert Haas | 2015-10-28 14:23:02 | Re: a raft of parallelism-related bug fixes |