kernel: add missing patch
[oweals/openwrt.git] / target / linux / generic / pending-4.9 / 302-mips_no_branch_likely.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Subject: mips: use -mno-branch-likely for kernel and userspace
3
4 saves ~11k kernel size after lzma and ~12k squashfs size in the
5
6 lede-commit: 41a039f46450ffae9483d6216422098669da2900
7 Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 ---
9  arch/mips/Makefile | 2 +-
10  1 file changed, 1 insertion(+), 1 deletion(-)
11
12 diff --git a/arch/mips/Makefile b/arch/mips/Makefile
13 index 1a6bac7b076f..5b656d9a1bbe 100644
14 --- a/arch/mips/Makefile
15 +++ b/arch/mips/Makefile
16 @@ -90,7 +90,7 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlinuz
17  # machines may also.  Since BFD is incredibly buggy with respect to
18  # crossformat linking we rely on the elf2ecoff tool for format conversion.
19  #
20 -cflags-y                       += -G 0 -mno-abicalls -fno-pic -pipe
21 +cflags-y                       += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
22  cflags-y                       += -msoft-float
23  LDFLAGS_vmlinux                        += -G 0 -static -n -nostdlib
24  KBUILD_AFLAGS_MODULE           += -mlong-calls
25 -- 
26 2.11.0
27