With this patch we introduce an option for glibc, which
installs getconf, ldconfig and ldd utilities on target, that
may be useful in debugging. By default these utilities are
built, but not installed to the target.
ldd is a bash script, so it has bash dependency.
Signed-off-by: Nikita Sobolev <Nikita.Sobolev@synopsys.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
help
https://www.gnu.org/software/libc/
endif
+
+config BR2_PACKAGE_GLIBC_UTILS
+ bool "Install glibc utilities"
+ depends on BR2_PACKAGE_BASH
+ help
+ Enabling this option will compile and install the getconf,
+ ldconfig and ldd glibc utilities for the target.
+
+comment "glibc utilities need bash"
+ depends on !BR2_PACKAGE_BASH
GLIBC_LIBS_LIB += libthread_db.so.*
endif
+ifeq ($(BR2_PACKAGE_GLIBC_UTILS),y)
+GLIBC_TARGET_UTILS_BIN = posix/getconf elf/ldconfig elf/ldd
+endif
+
define GLIBC_INSTALL_TARGET_CMDS
for libpattern in $(GLIBC_LIBS_LIB); do \
$(call copy_toolchain_lib_root,$$libpattern) ; \
done
+ $(foreach util,$(GLIBC_TARGET_UTILS_BIN), \
+ $(INSTALL) -D -m 0755 $(@D)/build/$(util) $(TARGET_DIR)/bin/$(notdir $(util))
+ )
endef
$(eval $(autotools-package))