]> git.itanic.dy.fi Git - linux-stable/commit
powerpc: add crtsavres.o to always-y instead of extra-y
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 20 Nov 2023 23:23:32 +0000 (08:23 +0900)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 27 Nov 2023 11:01:15 +0000 (22:01 +1100)
commit1b1e38002648819c04773647d5242990e2824264
treeae419ceab3ffd31f8c119ae6b967732e03d05a0f
parentc8a1634145c23a5a979a7166a12b99871812a6ab
powerpc: add crtsavres.o to always-y instead of extra-y

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

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Fixes: baa25b571a16 ("powerpc/64: Do not link crtsavres.o in vmlinux")
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231120232332.4100288-1-masahiroy@kernel.org
arch/powerpc/lib/Makefile