pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Дилян Палаузов <dpa-postgres@aegee.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14217: Respect $CFLAGS from /usr/local/etc/config.site
Date: Thu, 7 Jul 2016 21:40:25 -0400
Message-ID: <ec7d3b35-0e80-bd34-ff0f-36b81b06b8f2@2ndquadrant.com> (raw)
In-Reply-To: <6d7e8113-ee42-6f45-2c90-ca9bf831ee7e@aegee.org>
References: <20160628153309.GA23675@alvherre.pgsql>
	<21138.1467129943@sss.pgh.pa.us>
	<6d7e8113-ee42-6f45-2c90-ca9bf831ee7e@aegee.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 6/28/16 5:04 PM, Дилян Палаузов wrote:
> When building postgresql I noticed, that it doesn't use LTO.  What is the way to enable LTO builds with the current build system, except calling CFLAGS="-flto -O3" ./configure?

You can do it like that.  But I have tried that before and the 
performance improvement of the resulting binary is approximately zero 
percent.  So there is not a whole lot of enthusiasm right now to make 
that any easier.

> In all cases, doing unset CFLAGS is wrong, as it discards CFLAGS set in config.site, which it shall not.

As a workaround, you can fake it by setting ac_env_CFLAGS_set and 
ac_env_CFLAGS_value in config.site, to pretend that CFLAGS came from the 
environment.  We do support that.

If you want to come up with a more comprehensive patch to make this work 
right, we would consider it.  But as you've heard, this is a very 
marginal use case and the current system has been carefully tweaked, so 
it would take some convincing to change it.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)

Message-ID: <ec7d3b35-0e80-bd34-ff0f-36b81b06b8f2@2ndquadrant.com>
Permalink:  ../ec7d3b35-0e80-bd34-ff0f-36b81b06b8f2@2ndquadrant.com/
Also on:    postgresql.org/message-id/ec7d3b35-0e80-bd34-ff0f-36b81b06b8f2@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, dpa-postgres@aegee.org, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com
  Subject: Re: BUG #14217: Respect $CFLAGS from /usr/local/etc/config.site
  In-Reply-To: <ec7d3b35-0e80-bd34-ff0f-36b81b06b8f2@2ndquadrant.com>
  References: <20160628153309.GA23675@alvherre.pgsql> <21138.1467129943@sss.pgh.pa.us> <6d7e8113-ee42-6f45-2c90-ca9bf831ee7e@aegee.org> <ec7d3b35-0e80-bd34-ff0f-36b81b06b8f2@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox