From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756035AbcEQO43 (ORCPT ); Tue, 17 May 2016 10:56:29 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:32458 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752834AbcEQO4Z (ORCPT ); Tue, 17 May 2016 10:56:25 -0400 From: Paul Burton To: , Ralf Baechle CC: "Maciej W . Rozycki" , Paul Burton , "stable # v4 . 4+" , Subject: [PATCH v2 1/2] MIPS: Allow R6 compact branch policy to be left unspecified Date: Tue, 17 May 2016 15:55:53 +0100 Message-ID: <1463496954-24713-1-git-send-email-paul.burton@imgtec.com> X-Mailer: git-send-email 2.8.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.100.200.141] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It turns out that some toolchains which support MIPS R6 don't support the -mcompact-branches flag to specify compact branch behaviour. Default to not providing the -mcompact-branch option to the compiler such that we can build with such toolchains. Signed-off-by: Paul Burton Reported-by: kbuild test robot Fixes: c1a0e9bc885d ("MIPS: Allow compact branch policy to be changed") Cc: stable # v4.4+ --- Changes in v2: - Hide the options behind CONFIG_DEBUG_KERNEL. arch/mips/Kconfig.debug | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index f0e314c..ee3dc9b 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug @@ -117,7 +117,16 @@ if CPU_MIPSR6 choice prompt "Compact branch policy" - default MIPS_COMPACT_BRANCHES_OPTIMAL + depends on DEBUG_KERNEL + default MIPS_COMPACT_BRANCHES_DEFAULT + +config MIPS_COMPACT_BRANCHES_DEFAULT + bool "Toolchain Default (don't specify)" + help + Don't pass the -mcompact-branches flag to the compiler, allowing it + to use its default (generally "optimal"). This is particularly + useful for early R6-supporting toolchains which don't support the + -mcompact-branches flag. config MIPS_COMPACT_BRANCHES_NEVER bool "Never (force delay slot branches)" -- 2.8.2