toolchain: add a symlink for musl softfloat ldso to the path where our gcc expects it
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 20 Mar 2014 13:51:47 +0000 (13:51 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 20 Mar 2014 13:51:47 +0000 (13:51 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39966 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/libs/toolchain/Makefile

index 202e9d0..a29b322 100644 (file)
@@ -428,6 +428,9 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
                $(1)/lib/
   endef
 
+  LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_DIR)/lib/ld-musl-*.so*)))
+  $(warning LD_MUSL_NAME='$(LD_MUSL_NAME)')
+
   define Package/musl/install
        $(INSTALL_DIR) $(1)/lib
        $(CP) \
@@ -436,6 +439,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
        $(CP) \
                $(TOOLCHAIN_DIR)/lib/libc.so* \
                $(1)/lib/
+       $(if $(findstring -sf.so,$(LD_MUSL_NAME)),ln -s $(LD_MUSL_NAME) $(1)/lib/$(subst -sf.so,.so,$(LD_MUSL_NAME)))
   endef
 
   define Package/libc/install