From: "A. Sverdlin" <alexander.sverdlin@siemens.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Alexander Sverdlin <alexander.sverdlin@siemens.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
linux-kernel@vger.kernel.org,
Peter Marko <peter.marko@siemens.com>,
stable@vger.kernel.org
Subject: [PATCH] powerpc/Makefile: use $(objtree) for crtsavres.o
Date: Fri, 19 Sep 2025 14:14:12 +0200 [thread overview]
Message-ID: <20250919121417.1601020-1-alexander.sverdlin@siemens.com> (raw)
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
next reply other threads:[~2025-09-19 16:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 12:14 A. Sverdlin [this message]
2025-09-22 13:08 ` [PATCH] powerpc/Makefile: use $(objtree) for crtsavres.o Christophe Leroy
2025-09-22 13:50 ` Sverdlin, Alexander
Reply instructions:
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250919121417.1601020-1-alexander.sverdlin@siemens.com \
--to=alexander.sverdlin@siemens.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=peter.marko@siemens.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 read-only IMAP folder(s) and NNTP newsgroup(s).