diff options
author | Arien Judge <arienjudge@outlook.com> | 2023-10-13 20:58:16 +1100 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-10-20 18:55:55 +0200 |
commit | c46ae366cfe3ea985c2b866d8b61f87c2a981f85 (patch) | |
tree | f740aadbbd02dddbf707ce670170c9b72f857dec | |
parent | 4536fb4c5c7b3564dae301529bb0ac4a3ce914b8 (diff) |
toolchain: link ldd when using external toolchain
When using an external toolchain, ldd is not linked into the rootfs.
This causes subsequent upgrades to fail with 'Failed to exec upgraded'.
This patch adds the symlink when using an external toolchain and musl.
Signed-off-by: Arien Judge <arienjudge@outlook.com>
-rw-r--r-- | package/libs/toolchain/Makefile | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index f44536144d..ea36af5da4 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -655,12 +655,23 @@ else exit 0 endef + define Package/glibc/install + endef + + LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_ROOT_DIR)/lib/libc.so*))) + + define Package/musl/install + $(INSTALL_DIR) $(1)/usr/bin + $(LN) ../../lib/$(LD_MUSL_NAME) $(1)/usr/bin/ldd + endef + define Package/libc/install for file in $(call qstrip,$(CONFIG_LIBC_FILE_SPEC)); do \ $(INSTALL_DIR) $(1)/lib ; \ $(CP) $(call qstrip,$(CONFIG_LIBC_ROOT_DIR))/$$$$file $(1)/lib/ ; \ done ; \ exit 0 + $(call Package/$(LIBC)/install,$1) endef define Package/libpthread/install |