mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] glibc: install ldconfig and create ld.so.cache
Date: Thu, 8 Sep 2016 08:58:48 +0200	[thread overview]
Message-ID: <20160908065848.a2twn4wvf4ah5wlk@pengutronix.de> (raw)
In-Reply-To: <20160907214003.7711-1-clemens.gruber@pqgruber.com>

On Wed, Sep 07, 2016 at 11:40:03PM +0200, Clemens Gruber wrote:
> Add an option to install the ldconfig binary from the toolchain and
> another one to enable the generation of /etc/ld.so.cache at first boot
> with a rc-once.d script.
> Use only the new format, which is supported since glibc 2.2 from the
> year 2000.

Can you add a /etc/ld.so.conf as well? On my debian this only contains
'include /etc/ld.so.conf.d/*.conf'. It would be great if we can do that
to. Then other packages can provide files there.

Juergen: You had some other version of this somewhere. Can you take a look
at this? I think you had some extra paths for Qt, right?

Michael

> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
> ---
>  projectroot/etc/rc.once.d/ldconfig |  6 ++++++
>  rules/glibc.in                     | 17 +++++++++++++++++
>  rules/glibc.make                   |  9 +++++++++
>  3 files changed, 32 insertions(+)
>  create mode 100644 projectroot/etc/rc.once.d/ldconfig
> 
> diff --git a/projectroot/etc/rc.once.d/ldconfig b/projectroot/etc/rc.once.d/ldconfig
> new file mode 100644
> index 0000000..d5461a7
> --- /dev/null
> +++ b/projectroot/etc/rc.once.d/ldconfig
> @@ -0,0 +1,6 @@
> +#!/bin/sh
> +
> +PATH=/sbin:/bin:/usr/sbin:/usr/bin
> +
> +echo "Creating dynamic linker cache..."
> +ldconfig --format=new -X
> diff --git a/rules/glibc.in b/rules/glibc.in
> index 2f2fb09..662f0aa 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 ab2c4b6..e5ede0d 100644
> --- a/rules/glibc.make
> +++ b/rules/glibc.make
> @@ -124,6 +124,15 @@ 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)
> +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
> -- 
> 2.9.3
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2016-09-08  6:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07 21:40 Clemens Gruber
2016-09-08  6:58 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160908065848.a2twn4wvf4ah5wlk@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox