302-mips_no_branch_likely.patch 830 B

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