From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70079 invoked by alias); 19 Jun 2017 10:51:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 68407 invoked by uid 89); 19 Jun 2017 10:51:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=47PM, Hx-languages-length:1792, H*f:sk:CAFiYyc, 47pm X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Jun 2017 10:51:54 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7DC41AC03; Mon, 19 Jun 2017 10:51:57 +0000 (UTC) Subject: Re: [RFC] [PATCH] Introduce configure flag --with-stage1-cflags. From: =?UTF-8?Q?Martin_Li=c5=a1ka?= To: Richard Biener , Jakub Jelinek Cc: GCC Patches References: <41109217-1bf5-b112-e783-8040196fd410@suse.cz> <20170526115155.GL8499@tucnak> Message-ID: Date: Mon, 19 Jun 2017 10:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01291.txt.bz2 PING^1 Richi are you fine with the suggested change? I basically followed your advises :) Martin On 05/26/2017 03:00 PM, Martin Liška wrote: > On 05/26/2017 01:55 PM, Richard Biener wrote: >> On Fri, May 26, 2017 at 1:51 PM, Jakub Jelinek wrote: >>> On Fri, May 26, 2017 at 01:46:47PM +0200, Richard Biener wrote: >>>> On Thu, May 25, 2017 at 11:23 AM, Martin Liška wrote: >>>>> Hello. >>>>> >>>>> After a discussion with Richi, using adding "-O2" to STAGE1 cflags with a recent >>>>> enough compiler can significantly speed up bootstrap. Thus I'm suggesting to >>>>> introduce --with-stage1-cflags where one can provide such options. >>>> >>>> I don't think this is necessary -- you can always override with STAGE1_CFLAGS. >>>> >>>>> Apart from that, maybe it would be handy to automatically enable "-O2" when >>>>> one has a recent compiler? Do we have an example where we detect host compiler >>>>> and it's version? >>>> >>>> Don't know about version but configury already detects that we use GCC, so that >>>> knowledge should be readily available. >>> >>> Well, it certainly shouldn't be -O2 by default for any system GCC, more >>> something like if it is major of the configured configure minus 1 or newer >>> (or minus 2?), then use -O2, otherwise default to -O0 as before. >> >> I'd still default to -O0 on release branches regardless of version and then >> for development we can probably simply use "any GCC" when people have >> the chance to override. > > Ok, sending new patch that does that on experimental branches for ${CC} --version > being a GCC newer than 4.9. > > Martin > >> >> At least for me host GCC 4.8 works quite well with -O2. >> >> Richard. >> >>> Jakub >