Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 0/3] MIPS: Add support for LTO
@ 2021-12-13 22:49 Paul Cercueil
  2021-12-13 22:49 ` [PATCH 1/3] MIPS: boot/compressed: Disable abicalls Paul Cercueil
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Paul Cercueil @ 2021-12-13 22:49 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Nathan Chancellor, Nick Desaulniers
  Cc: list, linux-mips, linux-kernel, llvm, Paul Cercueil

Hi,

With this set of patches, it becomes possible to build a LTO'd kernel
with LLVM/Clang on MIPS.

This was tested on a Ingenic JZ4770 based system. It requires the
linking step of the vmlinuz.bin to be done with binutils' LD instead of
LLVM's ld.lld [1], but the vmlinuz ELF itself can be completely built
with LLVM.

Strangely, the LTO'd kernel is bigger in size (3.6 MiB vs. 3.1 MiB
without LTO), which might be completely normal and I just have wrong
expectations.

Cheers,
-Paul

[1]: https://github.com/ClangBuiltLinux/linux/issues/1333

Paul Cercueil (3):
  MIPS: boot/compressed: Disable abicalls
  MIPS: boot/compressed: Build without LTO
  MIPS: Add support for LTO

 arch/mips/Kconfig                  | 1 +
 arch/mips/boot/compressed/Makefile | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-12-14 19:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-13 22:49 [PATCH 0/3] MIPS: Add support for LTO Paul Cercueil
2021-12-13 22:49 ` [PATCH 1/3] MIPS: boot/compressed: Disable abicalls Paul Cercueil
2021-12-14 18:06   ` Nathan Chancellor
2021-12-14 19:09     ` Paul Cercueil
2021-12-14 19:38       ` Nick Desaulniers
2021-12-13 22:49 ` [PATCH 2/3] MIPS: boot/compressed: Build without LTO Paul Cercueil
2021-12-14 18:07   ` Nathan Chancellor
2021-12-14 19:43   ` Nick Desaulniers
2021-12-13 22:49 ` [PATCH 3/3] MIPS: Add support for LTO Paul Cercueil
2021-12-14 18:09   ` Nathan Chancellor
2021-12-14 19:45   ` Nick Desaulniers
2021-12-14 18:11 ` [PATCH 0/3] " Nathan Chancellor
2021-12-14 19:34 ` Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox