toolchain: musl: fix symlink for ldd
[lede.git] / package / libs / toolchain / Makefile
index 5e7116f3871f8de5ebedf3971ea42d01d15ac23f..10c990a12634dd3dc062544baa7521be7811355e 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2012 OpenWrt.org
+# Copyright (C) 2007-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,6 +10,7 @@ PKG_NAME:=toolchain
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
+PKG_LICENSE:=GPL-3.0-with-GCC-exception
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -426,7 +427,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
   define Package/eglibc/install
        $(CP) ./eglibc-files/* $(1)/
        rm -f $(1)/etc/localtime
-       ln -sf /tmp/localtime $(1)/etc/localtime
+       $(LN) /tmp/localtime $(1)/etc/localtime
        $(INSTALL_DIR) $(1)/lib
        $(CP) \
                $(TOOLCHAIN_DIR)/lib/ld*.so.* \
@@ -465,7 +466,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
                $(1)/lib/
   endef
 
-  LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_DIR)/lib/ld-musl-*.so*)))
+  LD_MUSL_NAME = $(notdir $(firstword $(wildcard $(TOOLCHAIN_DIR)/lib/libc.so*)))
 
   define Package/musl/install
        $(INSTALL_DIR) $(1)/lib $(1)/usr/bin
@@ -475,7 +476,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
        $(CP) \
                $(TOOLCHAIN_DIR)/lib/libc.so* \
                $(1)/lib/
-       ln -s ../../lib/$(LD_MUSL_NAME) $(1)/usr/bin/ldd
+       $(LN) ../../lib/$(LD_MUSL_NAME) $(1)/usr/bin/ldd
   endef
 
   define Package/libc/install