mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: ptxdist@pengutronix.de
Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Subject: [ptxdist] [PATCH] systemd: add setting to enable ldconfig service
Date: Thu, 19 May 2016 19:05:51 +0200	[thread overview]
Message-ID: <1463677551-32410-1-git-send-email-clemens.gruber@pqgruber.com> (raw)

Add a ptxdist setting to enable the systemd ldconfig.service, which
calls /sbin/ldconfig -X if /etc/ld.so.cache does not exist and the
machine boots or was updated.
Having a /etc/ld.so.cache file reduces the number of necessary syscalls
dramatically. This is especially noticeable when often calling small
binaries like /bin/true.
See: LD_DEBUG=libs /bin/true or strace /bin/true

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
---
 rules/systemd.in   | 7 +++++++
 rules/systemd.make | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/rules/systemd.in b/rules/systemd.in
index 876a890..fba72bc 100644
--- a/rules/systemd.in
+++ b/rules/systemd.in
@@ -73,6 +73,13 @@ config SYSTEMD_DISABLE_RANDOM_SEED
 	  the random seed is not possible.
 	  Warning: enabling this option may be insecure.
 
+config SYSTEMD_LDCONFIG
+	bool
+	prompt "enable ldconfig to initialize /etc/ld.so.cache"
+	help
+	  Enables ldconfig.service, which calls ldconfig at first boot and after
+	  systemd-update-done if /etc/ld.so.cache does not exist.
+
 config SYSTEMD_LOGIND
 	bool
 	select SYSTEMD_DBUS
diff --git a/rules/systemd.make b/rules/systemd.make
index 71c633a..776942d 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -121,7 +121,7 @@ SYSTEMD_CONF_OPT	:= \
 	--$(call ptx/endis,PTXCONF_UDEV_HWDB)-hwdb \
 	--disable-manpages \
 	--disable-hibernate \
-	--disable-ldconfig \
+	--$(call ptx/endis,PTXCONF_SYSTEMD_LDCONFIG)-ldconfig \
 	--enable-split-usr \
 	--disable-tests \
 	--disable-debug \
-- 
2.8.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2016-05-19 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 17:05 Clemens Gruber [this message]
2016-05-26  9:53 ` Michael Olbrich
2016-05-26 13:41   ` Clemens Gruber
2016-05-26 14:11     ` Michael Olbrich

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=1463677551-32410-1-git-send-email-clemens.gruber@pqgruber.com \
    --to=clemens.gruber@pqgruber.com \
    --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