mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] powerpc/Makefile: use $(objtree) for crtsavres.o
@ 2025-09-19 12:14 A. Sverdlin
  2025-09-22 13:08 ` Christophe Leroy
  0 siblings, 1 reply; 3+ messages in thread
From: A. Sverdlin @ 2025-09-19 12:14 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Alexander Sverdlin, Madhavan Srinivasan, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, linux-kernel, Peter Marko,
	stable

From: Alexander Sverdlin <alexander.sverdlin@siemens.com>

... otherwise it could be problematic to build external modules:

make[2]: Entering directory '.../kernel-module-hello-world'
|   CC [M]  hello-world.o
|   MODPOST Module.symvers
|   CC [M]  hello-world.mod.o
|   CC [M]  .module-common.o
|   LD [M]  hello-world.ko
| powerpc-poky-linux-ld.bfd: cannot find arch/powerpc/lib/crtsavres.o: No such file or directory

Fixes: da3de6df33f5 ("[POWERPC] Fix -Os kernel builds with newer gcc versions")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
---
 arch/powerpc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 9753fb87217c3..a58b1029592ce 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -58,7 +58,7 @@ ifeq ($(CONFIG_PPC64)$(CONFIG_LD_IS_BFD),yy)
 # There is a corresponding test in arch/powerpc/lib/Makefile
 KBUILD_LDFLAGS_MODULE += --save-restore-funcs
 else
-KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
+KBUILD_LDFLAGS_MODULE += $(objtree)/arch/powerpc/lib/crtsavres.o
 endif
 
 ifdef CONFIG_CPU_LITTLE_ENDIAN
-- 
2.51.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-22 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-19 12:14 [PATCH] powerpc/Makefile: use $(objtree) for crtsavres.o A. Sverdlin
2025-09-22 13:08 ` Christophe Leroy
2025-09-22 13:50   ` Sverdlin, Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®