From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Drop ldconfig handling
Date: Tue, 29 Dec 2015 21:34:20 +0100 [thread overview]
Message-ID: <20151229203420.GF3445@free.fr> (raw)
In-Reply-To: <1451420850-22132-1-git-send-email-thomas.petazzoni@free-electrons.com>
Thomas, All,
On 2015-12-29 21:27 +0100, Thomas Petazzoni spake thusly:
> The ldconfig handling in the main Makefile is utterly broken, as it
> calls the build machine ldconfig to generate the ld.so.cache of the
> target. Unfortunately, the format of the ld.so.cache is architecture
> specific, and therefore the build machine ldconfig cannot be used
> as-is.
>
> This patch therefore simply drops using ldconfig entirely, and removes
> /etc/ld.so.conf.d/ from the target skeleton. The idea is that all
> libraries that should be loaded by the dynamic linker must be
> installed in paths where the dynamic linker searches them by default
> (typically /lib or /usr/lib).
>
> This might potentially break a few packages, but the only way to know
> is to actually stop handling ldconfig. In order to be notified of such
> cases, we add a check in target-finalize to verify that there is no
> /etc/ld.so.conf file in the target.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Makefile | 14 ++------------
> system/skeleton/etc/ld.so.conf.d/.empty | 0
> 2 files changed, 2 insertions(+), 12 deletions(-)
> delete mode 100644 system/skeleton/etc/ld.so.conf.d/.empty
>
> diff --git a/Makefile b/Makefile
> index 1d69192..a15013e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -598,18 +598,8 @@ endif
> xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG)
>
> mkdir -p $(TARGET_DIR)/etc
> - # Mandatory configuration file and auxiliary cache directory
> - # for recent versions of ldconfig
> - touch $(TARGET_DIR)/etc/ld.so.conf
> - mkdir -p $(TARGET_DIR)/var/cache/ldconfig
> - if [ -x "$(TARGET_CROSS)ldconfig" ]; \
> - then \
> - $(TARGET_CROSS)ldconfig -r $(TARGET_DIR) \
> - -f $(TARGET_DIR)/etc/ld.so.conf; \
> - else \
> - /sbin/ldconfig -r $(TARGET_DIR) \
> - -f $(TARGET_DIR)/etc/ld.so.conf; \
> - fi
> + test -f $(TARGET_DIR)/etc/ld.so.conf && \
> + { echo "ERROR: we shouldn't have a /etc/ld.so.conf file"; exit 1; } || true
We could also add (in case a package installs something in there):
test -d $(TARGET_DIR)/etc/ld.so.conf.d && \
{ echo "ERROR: we shouldn't have a /etc/ld.so.conf.d directory"; exit 1; } || true
Otherwise:
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ( \
> echo "NAME=Buildroot"; \
> echo "VERSION=$(BR2_VERSION_FULL)"; \
> diff --git a/system/skeleton/etc/ld.so.conf.d/.empty b/system/skeleton/etc/ld.so.conf.d/.empty
> deleted file mode 100644
> index e69de29..0000000
> --
> 2.6.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2015-12-29 20:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-29 20:27 [Buildroot] [PATCH] Drop ldconfig handling Thomas Petazzoni
2015-12-29 20:34 ` Yann E. MORIN [this message]
2015-12-30 14:25 ` Arnout Vandecappelle
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=20151229203420.GF3445@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.