Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christoph Berg <christoph(dot)berg(at)credativ(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well
Date: 2018-11-13 22:33:30
Message-ID: 20181113223330.2ql7tg33hhh6husf@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2018-11-13 17:27:17 -0500, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2018-11-13 11:40:05 +0100, Christoph Berg wrote:
> >> While working on making extension modules built reproducibly, I
> >> noticed that extra flags passed via COPT (notably -ffile-prefix-map)
> >> do not get added to CXXFLAGS.
>
> > PROFILE I can see, but COPT I'm less sure. The name suggests it's about
> > C not C++. How about adding CXXOPT?
>
> > Secondary question: Why aren't you using CFLAGS/CXXFLAGS for this?
>
> COPT (and PROFILE) are handy for injecting additional flags manually;
> they're even documented for that (cf installation.sgml, around line
> 1550).

> I agree that CXXOPT would be a better idea than COPT for this.

Yea, I agree that we want CXX equivalent of the feature, especially for
-Werror. I'm just not sure that's the best fit for the debian build
issue Christoph ran into. I guess the goal is to *not* include the
-ffile-prefix-map in the CFLAGS for extensions, unless those are also
built via debian machinery?

> Not sure about PROFILE. But we could inject the latter into both
> flag sets and then document that if that's not what you want, use
> COPT.

That seems reasonable to me too.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-11-13 22:42:27 Re: add the source of param misconfigurations to error messages
Previous Message Tom Lane 2018-11-13 22:33:01 Re: add the source of param misconfigurations to error messages