Best Regards,
Ionel Zolog
Astronics Test Systems Inc.
O: 949-460-6809
C: 703-231-0814
ionel.zo...@astronics.com

-----Original Message-----
From: Clemens Gruber [mailto:clemens.gru...@pqgruber.com]
Sent: Thursday, May 19, 2016 10:06 AM
To: ptxdist@pengutronix.de
Cc: Clemens Gruber
Subject: [ptxdist] [PATCH] systemd: add setting to enable ldconfig service

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.gru...@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

This E-mail is confidential. It may also be legally privileged. If you are not 
the addressee you may not copy, forward, disclose or use any part of it. If you 
have received this message in error, please delete it and all copies from your 
system and notify the sender immediately by return E-mail.

Internet communications cannot be guaranteed to be timely, secure, error or 
virus-free. The sender does not accept liability for any errors or omissions.
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to