Re: Add EXTRA_CFLAGS to configure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add EXTRA_CFLAGS to configure
Date: 2015-10-28 13:36:39
Message-ID: 18743.1446039399@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Why don't you just edit Makefile.global after configure finishes?
Or use COPT or PROFILE?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-10-28 13:42:19 Re: Add EXTRA_CFLAGS to configure
Previous Message Tom Lane 2015-10-28 13:33:07 Re: [PROPOSAL] Max recursion depth in WITH Queries (Common Table Expressions)