From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932437AbcDVPtE (ORCPT ); Fri, 22 Apr 2016 11:49:04 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:12382 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932205AbcDVPsk (ORCPT ); Fri, 22 Apr 2016 11:48:40 -0400 Date: Fri, 22 Apr 2016 16:48:28 +0100 From: "Maciej W. Rozycki" To: Paul Burton CC: Ralf Baechle , Fengguang Wu , , , Philip Li Subject: Re: [kbuild-all] mipsel-linux-gnu-gcc: error: unrecognized command line option '-mcompact-branches=optimal' In-Reply-To: <20160422085445.GA14781@NP-P-BURTON> Message-ID: References: <201604201320.YHjfc2dZ%fengguang.wu@intel.com> <20160420133021.GG24051@linux-mips.org> <20160421045129.GB4038@wfg-t540p.sh.intel.com> <20160421203415.GK24051@linux-mips.org> <20160422085445.GA14781@NP-P-BURTON> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [10.20.78.30] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Apr 2016, Paul Burton wrote: > > In that case however it looks to me like these `-mcompact-branches=' > > options (all the three we support) need to be wrapped into `$(call > > cc-option,...)'. > > An alternative that it could be argued better fits the principle of > least surprise is to add an extra option to the Kconfig choice that > simply leaves -mcompact-branches unspecified. I just submitted a patch > to do so [1]. Hmm, good idea in principle, but given that -- as you say -- this is a debug option I have a further suggestion I'll reply to your patch submission with. > > They do not affect any functionality and they are an > > optimisation choice only anyway (and therefore I wonder why they've been > > placed in arch/mips/Kconfig.debug rather than arch/mips/Kconfig). > > They're in Kconfig.debug because debug is exactly what they've been > useful for - given that compact branches are new to R6 it's been useful > in debugging systems, both hardware & simulators, to sometimes not use > them. It's also been useful to force their use attempting to work around > the compiler bug that [2] works around differently (bug 2179 on DMZ > bugzilla). On the other hand I can't think of a reason we'd want to > specify compact branch policy that isn't for debug - I'd expect for > performance optimisation we're more likely to rely upon the toolchain > using a sensible policy if the kernel is built for a specific CPU (eg. > perhaps -mcpu=p6600 prefers non-compact branches & -mcpu=m6250 prefers > all compact branches, or similar). Good point, it should indeed be the compiler making the right choice for the `-mtune=' setting selected with the default branch policy rather the user fiddling with `-mcompact-branches=' manually unless, as you say, for debugging. Thanks for the patience to educate me. Maciej