toolchain-external: dynamic loader symlink to actual location of musl libc.so
PATCH 1/1 toolchain-external: dynamic loader symlink to actual location of musl libc.so
Test whenever musl libc.so located at /lib or /usr/lib and create dynamic library loader symlink accordingly.
--- toolchain/toolchain-external/pkg-toolchain-external.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
toolchain/toolchain-external/pkg-toolchain-external.mk +6 -1
@@ -489,7 +489,12 @@ else MUSL_ARCH = $(ARCH) endif define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK - ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1 + if test -e $(STAGING_DIR)/usr/lib/libc.so; then \ + LD_LINK_TARGET=../usr/lib/libc.so ;\ + else \ + LD_LINK_TARGET=libc.so ;\ + fi ;\ + ln -sf "$${LD_LINK_TARGET}" $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1 ; endef endif
Signature · 1 line
2.7.4
PATCH 1/1 toolchain-external: dynamic loader symlink to actual location of musl libc.so
ping?
Quoted 29 lines · Ilya Kuzmich
Test whenever musl libc.so located at /lib or
/usr/liband create dynamic library loader symlink accordingly.Signed-off-by Ilya Kuzmich <[email protected]>--- toolchain/toolchain-external/pkg-toolchain-external.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)toolchain/toolchain-external/pkg-toolchain-external.mk +6
-1@@ -489,7 +489,12 @@ else MUSL_ARCH = $(ARCH) endif define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK - ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1 + if test -e $(STAGING_DIR)/usr/lib/libc.so; then \ + LD_LINK_TARGET=../usr/lib/libc.so ;\ + else \ + LD_LINK_TARGET=libc.so ;\ + fi ;\ + ln -sf "$${LD_LINK_TARGET}" $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1 ; endef endifSignature · 1 line
2.7.4
PATCH 1/1 toolchain-external: dynamic loader symlink to actual location of musl libc.so
In reply to Ilya KuzmichHello,
Quoted 4 lines · Ilya Kuzmich
Test whenever musl libc.so located at /lib or
/usr/liband create dynamic library loader symlink accordingly.Signed-off-by Ilya Kuzmich <[email protected]>
Thanks. However, after discussing this issue, we found that we could in fact entirely get rid of this TOOLCHAIN_EXTERNAL_MUSL_LD_LINK hook. See
https://patchwork.ozlabs.org/patch/783188/.
So I've marked your patch as "Superseded". Of course, my new proposal has been tested with a Crosstool-NG musl toolchain.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com