summaryrefslogtreecommitdiff
path: root/arch/mips/Makefile
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2015-09-22 20:07:41 +0300
committerRalf Baechle <ralf@linux-mips.org>2015-10-26 11:49:40 +0300
commitc1a0e9bc885d46e519fd87d35af6a7937abfb986 (patch)
tree164b0f0d9277c233eea8eccb2baa8bb60ec3cf0f /arch/mips/Makefile
parent05513992c69d159e698bb4b5f651abd0ceff525c (diff)
downloadlinux-c1a0e9bc885d46e519fd87d35af6a7937abfb986.tar.xz
MIPS: Allow compact branch policy to be changed
When debugging it can be helpful to change the policy for compiler use of MIPSr6 compact branches, in order to rule out or home in on their involvement in bugs. Allow the GCC -mcompact-branches= flag to be set via Kconfig under the "Kernel hacking" menu. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11178/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r--arch/mips/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 252e347958f3..3f70ba54ae21 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -204,6 +204,10 @@ toolchain-msa := $(call cc-option-yn,$(mips-cflags) -mhard-float -mfp64 -Wa$(
cflags-$(toolchain-msa) += -DTOOLCHAIN_SUPPORTS_MSA
endif
+cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_NEVER) += -mcompact-branches=never
+cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_OPTIMAL) += -mcompact-branches=optimal
+cflags-$(CONFIG_MIPS_COMPACT_BRANCHES_ALWAYS) += -mcompact-branches=always
+
#
# Firmware support
#