Regression: commit 987fdfec2410 causes build to incorrectly issue warning

Masahiro Yamada masahiroy at kernel.org
Sun Jul 4 17:31:24 PDT 2021


On Fri, Jul 2, 2021 at 11:48 PM Russell King (Oracle)
<linux at armlinux.org.uk> wrote:
>
> On Fri, Jul 02, 2021 at 02:13:01PM +0100, Russell King - ARM Linux admin wrote:
> > Hi,
> >
> > Commit 987fdfec2410 ("arm64: move --fix-cortex-a53-843419 linker test to
> > Kconfig") breaks the ability to detect linker support for this option.
> > Building 5.13 for aarch64 with Debian binutils 2.31.1 results in:
> >
> > .../arch/arm64/Makefile:25: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
> >
> > This is because ARM64_LD_HAS_FIX_ERRATUM_843419 is not set in the
> > Kconfig, indicating that the Kconfig test for linker support for
> > --fix-cortex-a53-843419 has failed, yet this version of binutils does
> > support this option:
> >
> > $ aarch64-linux-gnu-ld --help | grep -e --fix-cortex-a53-843419 | wc -l
> > 8
> >
> > Reverting this commit fixes the problem for me.
>
> Sadly, while reverting the commit fixes it during the initial build
> run, the warning pops up when doing the installation step.
>
> I'm not entirely sure what's going on here. Having put the commit
> back, and re-run strace (and waited ages) it appears that the
> ld-option command does succeed, and I eventually end up with the
> option present in .config.
>
> However, it seems that if we have a .config that has the errata
> enabled, but doesn't contain the _LD_ option, then we end up issuing
> the warning before we re-run the Kconfig step.
>
> Eventually, I seem to have ended up with the _LD_ option set. Quite
> how, I don't know. When I originally noticed the problem, I had done
> a full rebuild. I then re-ran the build several times, and the warning
> popped up every time.
>
> Now that I've touched arch/arm64/Kconfig and re-run the build, it
> doesn't warn anymore - in fact, while investigating this and stracing,
> the option magically set itself and the problem has vanished.
>
> There is definitely weirdness and unpredictability going on with
> Kbuild - I can't explain it. Maybe its just become way to complex...
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!


I do not know your issue occurs, and not perfectly sure if this
is related to your case, but I also see some cases where this false-positive
warning is displayed.

Could you please try the attached patch?


-- 
Best Regards
Masahiro Yamada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-arm64-move-warning-about-toolchains-to-archprepare.patch
Type: text/x-patch
Size: 2962 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210705/3ec389e0/attachment-0001.bin>


More information about the linux-arm-kernel mailing list