From: Lecopzer Chen <firstname.lastname@example.org>
Subject: Re: [PATCH] kbuild: lto: fix module versionings mismatch in incremental build
Date: Wed, 16 Jun 2021 16:02:52 +0800 [thread overview]
Message-ID: <email@example.com> (raw)
> On Tue, Jun 15, 2021 at 02:26:58PM +0800, Lecopzer Chen wrote:
> > > On Mon, Jun 14, 2021 at 01:51:09PM +0800, Lecopzer Chen wrote:
> > > > When building modules(CONFIG_...=m), I found some of module versions
> > > > are incorrect and set to 0.
> > > > This can be found in build log for first clean build which shows
> > > >
> > > > WARNING: EXPORT symbol "XXXX" [drivers/XXX/XXX.ko] version generation failed, symbol will not be versioned.
> > >
> > > I'm doing this, and I don't see the problem:
> > >
> > > $ make LLVM=1 LLVM_IAS=1 distclean
> > > $ make LLVM=1 LLVM_IAS=1 menuconfig
> > > *enable LTO*
> > > *enable a module*
> > > $ make LLVM=1 LLVM_IAS=1 -j...
> > >
> > > What series of commands (and .config) shows this for you?
> > Hi Kees,
> > Thanks for you checking.
> > After double checking in clean android kernel build, this causes by
> > make version.
> > (I have build failed in Linux LTO,
> > seems it's not well support in contract to android?)
> > I knew Google has LTO first in Android and upstream later, and most code
> > are same as upstream, so the env here I use Android common kernel for
> > easily testing.
> > Test env is android common kernel: android12-5.4  with its latest code
> > and it builds from build.sh
> > $ BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
> > + make O=.... LLVM=1 LLVM_IAS=1 DEPMOD=depmod -j12 Image modules Image.lz4
> > With make set to v3.81, this can be reproduced with CONFIG_TEE=m.
> > With version >= 4.2 this is not reproducible.
> Ah, very interesting. While there are tests in Makefile for
> MAKE_VERSION, if we want to do this, it should likely be extended to
> Kconfig, as that's where the initial version tests for things happen. We
> could require MAKE_VERSION >= 4.2 for LTO?
Yes, We can imitate how CLANG_VERSION was implemented in Kconfig.
Accroding to GNU make release page, I've only tested for 3.81,
4.2 and 4.3.
4.2 was released in 2016, I think it's fine for LTO lowest version.
next prev parent reply other threads:[~2021-06-16 8:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 5:51 [PATCH] kbuild: lto: fix module versionings mismatch in incremental build Lecopzer Chen
2021-06-14 9:49 ` Lecopzer Chen
2021-06-14 23:09 ` Kees Cook
2021-06-15 6:26 ` Lecopzer Chen
2021-06-15 15:22 ` Kees Cook
2021-06-16 8:02 ` Lecopzer Chen [this message]
2021-06-16 16:43 ` Kees Cook
2021-06-17 1:58 ` Lecopzer Chen
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).