toolchain: add musl libc.so to external toolchain
[openwrt/openwrt.git] / package / libs / toolchain / Makefile
index 4822ca7be3ba722b174811a5b615052e5f66f1c0..58bd06cb5aba92f8d42f293ee978bddee90de215 100644 (file)
@@ -164,7 +164,7 @@ define Package/libc/config
                string
                prompt "libc shared library files (use wildcards)"
                depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
-               default "./lib/ld{*.so*,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"
+               default "./lib/ld{*.so*,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*,.so}"
 
        endmenu
 endef
@@ -202,6 +202,26 @@ $(call Package/libc/Default)
   TITLE:=POSIX thread library debugging support
 endef
 
+define Package/libthread-db/config
+       menu "Configuration"
+       depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
+
+       config LIBTHREAD_DB_ROOT_DIR
+               string
+               prompt "POSIX thread debugging shared library base directory"
+               depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
+               default TOOLCHAIN_ROOT  if !NATIVE_TOOLCHAIN
+               default "/"  if NATIVE_TOOLCHAIN
+
+       config LIBTHREAD_DB_FILE_SPEC
+               string
+               prompt "POSIX thread debugging shared library files (use wildcards)"
+               depends on EXTERNAL_TOOLCHAIN && PACKAGE_libthread-db
+               default "./lib/libthread_db{-*.so,.so.*}"
+
+       endmenu
+endef
+
 define Package/librt
 $(call Package/libc/Default)
   TITLE:=POSIX.1b RealTime extension library
@@ -529,6 +549,14 @@ else
        exit 0
   endef
 
+  define Package/libthread-db/install
+       for file in $(call qstrip,$(CONFIG_LIBTHREAD_DB_FILE_SPEC)); do \
+               $(INSTALL_DIR) $(1)/lib ; \
+               $(CP) $(call qstrip,$(CONFIG_LIBTHREAD_DB_ROOT_DIR))/$$$$file $(1)/lib/ ; \
+       done ; \
+       exit 0
+  endef
+
   define Package/librt/install
        for file in $(call qstrip,$(CONFIG_LIBRT_FILE_SPEC)); do \
                $(INSTALL_DIR) $(1)/lib ; \