blob: bf1b489111d89fde73b2d368636b626ee49d51f9 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From: Felix Fietkau <nbd@nbd.name>
2Subject: mips: use -mno-branch-likely for kernel and userspace
3
4saves ~11k kernel size after lzma and ~12k squashfs size in the
5
6lede-commit: 41a039f46450ffae9483d6216422098669da2900
7Signed-off-by: Felix Fietkau <nbd@nbd.name>
8---
9 arch/mips/Makefile | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12--- a/arch/mips/Makefile
13+++ b/arch/mips/Makefile
14@@ -92,7 +92,7 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
15 # machines may also. Since BFD is incredibly buggy with respect to
16 # crossformat linking we rely on the elf2ecoff tool for format conversion.
17 #
18-cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
19+cflags-y += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
20 cflags-y += -msoft-float
21 LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
22 KBUILD_AFLAGS_MODULE += -mlong-calls