Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753583AbbFRIPd (ORCPT ); Thu, 18 Jun 2015 04:15:33 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49118 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753799AbbFRINd (ORCPT ); Thu, 18 Jun 2015 04:13:33 -0400 Date: Thu, 18 Jun 2015 10:13:29 +0200 From: Michal Marek To: Geert Uytterhoeven Cc: Vineet Gupta , "linux-arch@vger.kernel.org" , lkml Subject: Re: subtle side effect of commit a1c48bb160f836 Message-ID: <20150618081329.GA9434@pobox.suse.cz> References: <55826966.6050202@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1725 Lines: 42 On Thu, Jun 18, 2015 at 09:10:30AM +0200, Geert Uytterhoeven wrote: > Hi Vineet, > > On Thu, Jun 18, 2015 at 8:47 AM, Vineet Gupta > wrote: > > commit a1c48bb160f8368 "Makefile: Fix unrecognized cross-compiler command line > > options" moved ARCH specific cc option handling before common -Os/O2 setup. > > > > For ARC this had a subtle effect that we can no longer over-ride generic -O2 with > > -O3, hence a performance regression observed going from 3.13 to 3.18 (the above > > commit went into 3.16) > > > > I want to understand how to properly fix this. Moving the include of arch makefile > > will bring back the old issue. I can introduce another option to set default optim > > level, but only arc/m32r care about it anyways. m32r only sets -O for its assembler. > Can we include $(srctree)/arch/$(SRCARCH)/Makefile twice? Please don't, the gcc commandline is long enough already. > Or perhaps we can not apply the extra -O* if there's already a -O* option? > > Alternatively, as we already have CONFIG_CC_OPTIMIZE_FOR_SIZE, > a(nother) Kconfig option may make sense. We can also introduce some ARCH_CFLAGS that is appended near the end of the list, and have arc/Makefile add its -O3 there. But I'd like to why the -O3 needs to be there in first place. Obviously, the kernel works with -O2, otherwise the regression would have been identified earlier. So why can't users specify -O3 in KCFLAGS like on any other architecture. Michal -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/