diff options
-rw-r--r-- | projectroot/etc/ld.so.conf | 1 | ||||
-rw-r--r-- | projectroot/etc/rc.once.d/ldconfig | 7 | ||||
-rw-r--r-- | rules/glibc.in | 17 | ||||
-rw-r--r-- | rules/glibc.make | 13 |
4 files changed, 38 insertions, 0 deletions
diff --git a/projectroot/etc/ld.so.conf b/projectroot/etc/ld.so.conf new file mode 100644 index 000000000..83327c01b --- /dev/null +++ b/projectroot/etc/ld.so.conf @@ -0,0 +1 @@ +include /etc/ld.so.conf.d/*.conf diff --git a/projectroot/etc/rc.once.d/ldconfig b/projectroot/etc/rc.once.d/ldconfig new file mode 100644 index 000000000..76220098f --- /dev/null +++ b/projectroot/etc/rc.once.d/ldconfig @@ -0,0 +1,7 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +echo "Creating dynamic linker cache..." +ldconfig --format=new -X && +rm -rf /var/cache/ldconfig diff --git a/rules/glibc.in b/rules/glibc.in index 2f2fb0953..662f0aa3e 100644 --- a/rules/glibc.in +++ b/rules/glibc.in @@ -172,6 +172,23 @@ config GLIBC_NSL nis(+) +config GLIBC_LDCONFIG + bool + prompt "Install ldconfig" + help + ldconfig creates a shared library cache, which reduces the number + of library locations, the loader needs to check, significantly and + therefore improves launch times for programs. + +config GLIBC_LDCONFIG_RC_ONCE + bool + prompt "Create /etc/ld.so.cache" + depends on GLIBC_LDCONFIG + help + The ld.so.cache is generated once at first boot. If you update your + libraries later on at runtime, you have to make sure to update the + cache as well. See /etc/rc.once.d/ldconfig + config GLIBC_I18N_BIN_LOCALE bool prompt "Install locale" diff --git a/rules/glibc.make b/rules/glibc.make index ab2c4b63e..c662d3bd1 100644 --- a/rules/glibc.make +++ b/rules/glibc.make @@ -4,6 +4,7 @@ # 2003 by Auerswald GmbH & Co. KG, Schandelah, Germany # 2005-2009 by Marc Kleine-Budde <mkl@pengutronix.de>, Pengutronix e.K., Hildesheim, Germany # (C) 2010 by Michael Olbrich <m.olbrich@pengutronix.de> +# (C) 2016 by Clemens Gruber <clemens.gruber@pqgruber.com> # # See CREDITS for details about who has contributed to this project. # @@ -124,6 +125,18 @@ ifdef PTXCONF_GLIBC_GCONV_ZH @$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so) endif +ifdef PTXCONF_GLIBC_LDCONFIG + @$(call install_copy, glibc, 0, 0, 0755, \ + $(PTXDIST_SYSROOT_TOOLCHAIN)/sbin/ldconfig, /sbin/ldconfig) + @$(call install_alternative, glibc, 0, 0, 0644, /etc/ld.so.conf) + @$(call install_copy, glibc, 0, 0, 0755, /etc/ld.so.conf.d) +endif + +ifdef PTXCONF_GLIBC_LDCONFIG_RC_ONCE + @$(call install_alternative, glibc, 0, 0, 0755, \ + /etc/rc.once.d/ldconfig) +endif + ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE @$(call install_copy_toolchain_usr, glibc, bin/locale) endif |