[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQe5SounO60gyYE_3e-M0cAAgT=9jac_SLcR0i9BeEgDQ@mail.gmail.com>
Date: Tue, 6 Feb 2024 05:50:58 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Jan Stancek <jstancek@...hat.com>
Cc: Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>, linuxppc-dev@...ts.ozlabs.org,
Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>, Tom Rix <trix@...hat.com>,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] powerpc: add crtsavres.o to always-y instead of extra-y
On Mon, Feb 5, 2024 at 10:22 PM Jan Stancek <jstancek@...hat.com> wrote:
>
> On Mon, Feb 5, 2024 at 12:50 PM Michael Ellerman <mpe@...erman.idau> wrote:
> >
> > Jan Stancek <jstancek@...hat.com> writes:
> > > On Tue, Nov 21, 2023 at 10:51:34AM +1000, Nicholas Piggin wrote:
> > >>On Tue Nov 21, 2023 at 9:23 AM AEST, Masahiro Yamada wrote:
> > >>> crtsavres.o is linked to modules. However, as explained in commit
> > >>> d0e628cd817f ("kbuild: doc: clarify the difference between extra-y
> > >>> and always-y"), 'make modules' does not build extra-y.
> > >>>
> > >>> For example, the following command fails:
> > >>>
> > >>> $ make ARCH=powerpc LLVM=1 KBUILD_MODPOST_WARN=1 mrproper ps3_defconfig modules
> > >>> [snip]
> > >>> LD [M] arch/powerpc/platforms/cell/spufs/spufs.ko
> > >>> ld.lld: error: cannot open arch/powerpc/lib/crtsavres.o: No such file or directory
> > >>> make[3]: *** [scripts/Makefile.modfinal:56: arch/powerpc/platforms/cell/spufs/spufs.ko] Error 1
> > >>> make[2]: *** [Makefile:1844: modules] Error 2
> > >>> make[1]: *** [/home/masahiro/workspace/linux-kbuild/Makefile:350: __build_one_by_one] Error 2
> > >>> make: *** [Makefile:234: __sub-make] Error 2
> > >>>
> > >>
> > >>Thanks. Is this the correct Fixes tag?
> > >>
> > >>Fixes: d0e628cd817f ("powerpc/64: Do not link crtsavres.o in vmlinux")
> > >>
> > >>Hmm, looks like LLD might just do this now automatically for us
> > >>too without --save-restore-funcs (https://reviews.llvm.org/D79977).
> > >>But we probably still need it for older versions, so we still need
> > >>your patch.
> > >
> > > Hi,
> > >
> > > I'm still seeing the error of crtsavres.o missing when building external modules
> > > after "make LLVM=1 modules_prepare". Should it be built also in archprepare?
> >
> > Or modules_prepare?
> >
> > Example patch below.
>
> I tested your patch with my setup and that works for me as well.
>
Please note 'make ARCH=powerpc clean' will remove '*.o'
files globally.
Kbuild promised you would still be able to compile external modules
after 'make clean' (until you run 'make mrproper'), but
that would not work in this case.
So, the external module support for powerpc
is broken in another way, already.
Perhaps, an easy workaround might be to change
the suffix, but I did not test it at all.
mv arch/powerpc/lib/crtsavres.o arch/powerpc/lib/crtsavres.o.do_not_remove_me
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists