From d811d8d0fdf76f73b9c4108094bafcb72becec5d Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 3 Jul 2013 16:51:00 -0400 Subject: Generate /etc/ld.so.cache for image Shaves a trivial, but measurable, amount of time off of early userspace at the cost of a small cache file. Signed-off-by: Dave Reisner --- functions | 3 +++ mkinitcpio | 3 +++ 2 files changed, 6 insertions(+) diff --git a/functions b/functions index 8a4e3be..532884f 100644 --- a/functions +++ b/functions @@ -658,6 +658,9 @@ initialize_buildroot() { # indicate that this is an initramfs >"$workdir/root/etc/initrd-release" + # add a blank ld.so.conf to keep ldconfig happy + >"$workdir/root/etc/ld.so.conf" + printf '%s' "$workdir" } diff --git a/mkinitcpio b/mkinitcpio index 6e03635..0ae6913 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -482,6 +482,9 @@ set +o functrace set +o errtrace trap -- ERR +# this is simply a nice-to-have -- it doesn't matter if it fails. +ldconfig -r "$BUILDROOT" &>/dev/null + if [[ $_optgenimg ]]; then build_image "$_optgenimg" "$_optcompress" else -- cgit v1.2.3-24-g4f1b