All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Nathan Chancellor <nathan@kernel.org>,
	list@opendingux.net,  linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org,  llvm@lists.linux.dev
Subject: Re: [PATCH 0/3] MIPS: Add support for LTO
Date: Tue, 14 Dec 2021 11:34:02 -0800	[thread overview]
Message-ID: <CAKwvOdn=7iYyOg8+wikOK-6Xogf9Z6wdmkJEacYV_S1MpZ-YDw@mail.gmail.com> (raw)
In-Reply-To: <20211213224914.1501303-1-paul@crapouillou.net>

On Mon, Dec 13, 2021 at 2:49 PM Paul Cercueil <paul@crapouillou.net> wrote:
>
> Hi,
>
> With this set of patches, it becomes possible to build a LTO'd kernel
> with LLVM/Clang on MIPS.

Paul,
Overall, nice work pursuing this and working through all the related
issues; thanks for the series!

We should clarify whether this is LTO_CLANG_THIN or LTO_CLANG_FULL.
Getting support for either would be nice, but for each architecture
has had its own distinct challenges.

>
> 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.

eh, this patch set sounds incomplete then; Can we wait to resolve
https://github.com/ClangBuiltLinux/linux/issues/1333 BEFORE this
series?  Hacking up arch/mips/boot/compressed/Makefile to force a
different linker is not something we should encourage.

>
> 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.

Are you building with CC_OPTIMIZE_FOR_SIZE or CC_OPTIMIZE_FOR_SIZE?
LTO != LD_DEAD_CODE_DATA_ELIMINATION

>
> 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
>


-- 
Thanks,
~Nick Desaulniers

      parent reply	other threads:[~2021-12-14 19:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKwvOdn=7iYyOg8+wikOK-6Xogf9Z6wdmkJEacYV_S1MpZ-YDw@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=list@opendingux.net \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=paul@crapouillou.net \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.