Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLKmT-0006dZ-5d for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Jul 2016 01:40:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bLKmS-0000uN-Jy for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Jul 2016 01:40:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bLKmR-0000tn-JD for pgsql-bugs@postgresql.org; Fri, 08 Jul 2016 01:40:35 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bLKmK-0000sO-3j for pgsql-bugs@postgresql.org; Fri, 08 Jul 2016 01:40:34 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 76E9320345; Thu, 7 Jul 2016 21:40:26 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 07 Jul 2016 21:40:26 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=s5urqeHl4XFJC5u KTngM2YCbWx4=; b=iEh+ghoSKjgezPPBw5Tf0qSGVmU9hT4RKU0o5n/919E67XN zn7FAb2ASGlK1ivflkrwYQ3SEQZ4XLptdcawtEc1N9sw29zzVCWpXeYg3e+Ttjsw /z0JPM5ujKHlZq6CyiR7ipDcHyHid6yD2A+mXI1oiBeOtwIzU9aw3L+uP0yA= X-Sasl-enc: sRVhfSLS/8J1Wv5ymL9f1HyCpdScwkzqU264CX72oA0U 1467942026 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 0DA70F29FE; Thu, 7 Jul 2016 21:40:26 -0400 (EDT) Subject: Re: BUG #14217: Respect $CFLAGS from /usr/local/etc/config.site To: =?UTF-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= , Tom Lane , Alvaro Herrera References: <20160628153309.GA23675@alvherre.pgsql> <21138.1467129943@sss.pgh.pa.us> <6d7e8113-ee42-6f45-2c90-ca9bf831ee7e@aegee.org> Cc: pgsql-bugs@postgresql.org From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Thu, 7 Jul 2016 21:40:25 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <6d7e8113-ee42-6f45-2c90-ca9bf831ee7e@aegee.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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