diff --git a/package/toolchain/Makefile b/package/toolchain/Makefile
index ec5508a7547d7db35a38ed47d56320ed8792a932..b9d582ee4dcb6663acca76e64b6e8d790c358bd2 100644
--- a/package/toolchain/Makefile
+++ b/package/toolchain/Makefile
@@ -172,6 +172,7 @@ endef
 
 define Package/libthread-db
 $(call Package/libc/Default)
+  DEPENDS:=@!USE_MUSL
   TITLE:=POSIX thread library debugging support
 endef
 
@@ -230,6 +231,7 @@ endef
 
 define Package/ldd
 $(call Package/libc/Default)
+  DEPENDS:=@!USE_MUSL
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=LDD trace utility
@@ -258,6 +260,7 @@ endef
 
 define Package/ldconfig
 $(call Package/libc/Default)
+  DEPENDS:=@!USE_MUSL
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=Shared library path configuration
@@ -479,10 +482,12 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
 
   define Package/librt/install
 	$(INSTALL_DIR) $(1)/lib
+  ifneq ($(CONFIG_USE_MUSL),y)
 	$(CP) \
 		$(TOOLCHAIN_DIR)/lib/librt.so.* \
 		$(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so \
 		$(1)/lib/
+  endif
   endef
 
   define Package/ldd/install