Skip to content

Commit

Permalink
toolchain: Allow external toolchains to specify libthread-db
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ffainelli committed Mar 4, 2017
1 parent 6debeaa commit 7f0c95a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions package/libs/toolchain/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -517,6 +537,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 ; \
Expand Down

0 comments on commit 7f0c95a

Please sign in to comment.