summaryrefslogtreecommitdiff
path: root/package/libs
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-03-02 11:37:29 -0800
committerJo-Philipp Wich <jo@mein.io>2017-12-13 14:38:15 +0100
commit28c9731984a01c296eb8de210d1e32b44a527b36 (patch)
treea0e40df234520b4e14c527df608ac9a6cf25cc4e /package/libs
parent2dd9b62f82afba5dd1e7534cecfadad871d85885 (diff)
downloadmtk-20170518-28c9731984a01c296eb8de210d1e32b44a527b36.zip
mtk-20170518-28c9731984a01c296eb8de210d1e32b44a527b36.tar.gz
mtk-20170518-28c9731984a01c296eb8de210d1e32b44a527b36.tar.bz2
toolchain: Allow external toolchains to specify libthread-db
We need to let external toolchains be able to specify the path and specification file to the libthread-db POSIX thread debugging shared libraries. This fixes GDB not being able to be installed because it is depending on libthread-db: Collected errors: * satisfy_dependencies_for: Cannot satisfy the following dependencies * for gdb: * libthread-db * * opkg_install_cmd: Cannot install package gdb. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> (cherry picked from commit 7f0c95a7dfff8aa0b6f5e3e78263cab108245e4c)
Diffstat (limited to 'package/libs')
-rw-r--r--package/libs/toolchain/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile
index 4822ca7..88adb9a 100644
--- a/package/libs/toolchain/Makefile
+++ b/package/libs/toolchain/Makefile
@@ -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 ; \