[openwrt/openwrt] sdk: include lib/crtsavres.o for powerpc
LEDE Commits
lede-commits at lists.infradead.org
Tue Apr 9 02:19:20 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7c39a95a2f6ae638f173833dc8d4c120e25475c8
commit 7c39a95a2f6ae638f173833dc8d4c120e25475c8
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 8 17:52:22 2024 +0200
sdk: include lib/crtsavres.o for powerpc
Trying to link certain kernel modules like dahdi-linux when building with
the OpenWrt SDK will fail with:
openwrt-sdk-apm821xx-sata_gcc-13.2.0_musl.Linux-x86_64/staging_dir/toolchain-powerpc_464fp_gcc-13.2.0_musl/bin/powerpc-openwrt-linux-musl-ld: cannot find arch/powerpc/lib/crtsavres.o: No such file or directory
Previously this worked with the PowerPC SDK since we carried a hack that
was passing --save-restore-funcs to module LDFLAGS so the linker provided
the required functions automatically as without --save-restore-funcs it
doesnt do so automatically on relocatable links and as a sideffect did not
require the kernel provided crtsaves.o to link against.
Now that hack has been removed as upstream kernel now compiles crtsaves.o
by default so it can be linked against but its not included in the SDK.
So, lets include lib/crtsavres.o when SDK is generated for PowerPC.
Fixes: 99c9d8abd677 ("kernel: bump 5.15 to 5.15.148")
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/sdk/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index c57a451617..d0c0ab7a2b 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -68,6 +68,10 @@ KERNEL_FILES_ARCH = \
kernel/asm-offsets.s \
kernel/module.lds
+ifeq ($(LINUX_KARCH),powerpc)
+ KERNEL_FILES_ARCH += lib/crtsavres.o
+endif
+
KERNEL_FILES_BASE := \
.config \
Makefile \
More information about the lede-commits
mailing list