mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] glibc: Make it possible to install ldd
@ 2013-08-14  9:34 Bernhard Walle
  2013-08-14  9:48 ` Marc Kleine-Budde
  0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Walle @ 2013-08-14  9:34 UTC (permalink / raw)
  To: ptxdist

The standalone ldd of ptxdist doesn't work with all toolchains.
For example, for my ct-ng based toolchain, /lib/ld-linux-armhf.so.3
must be in the RTLDLIST.

Instead of adding more intelligence to the script, we just install the
ldd from the toolchain which already has the right RTLDLIST.

The patch also adds some guard for the standalone ldd to avoid selecting
both variants in the configuration.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/glibc.in   | 7 +++++++
 rules/glibc.make | 5 +++++
 rules/ldd.in     | 4 ++++
 3 files changed, 16 insertions(+)

diff --git a/rules/glibc.in b/rules/glibc.in
index 2f2fb09..de214d0 100644
--- a/rules/glibc.in
+++ b/rules/glibc.in
@@ -163,6 +163,13 @@ config GLIBC_RESOLV
 	  will need both libraries if your /etc/nsswitch.conf contains a line
 	  like "hosts: file dns"
 
+config GLIBC_LDD
+	bool
+	prompt "Install ldd"
+	help
+	  Install 'ldd' from the toolchain.
+
+
 config GLIBC_NSL
 	bool
 	prompt "Install libnsl"
diff --git a/rules/glibc.make b/rules/glibc.make
index d2c5519..d1dea73 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -99,6 +99,11 @@ ifdef PTXCONF_GLIBC_RESOLV
 	@$(call install_copy_toolchain_lib, glibc, libresolv.so)
 endif
 
+ifdef PTXCONF_GLIBC_LDD
+	@echo "Installing ldd"
+	$(call install_copy_toolchain_usr, glibc, bin/ldd)
+endif
+
 ifdef PTXCONF_GLIBC_NSL
 	@$(call install_copy_toolchain_lib, glibc, libnsl.so)
 endif
diff --git a/rules/ldd.in b/rules/ldd.in
index 66422c2..33756bb 100644
--- a/rules/ldd.in
+++ b/rules/ldd.in
@@ -3,5 +3,9 @@
 config LDD
 	tristate
 	prompt "ldd"
+	depends on !GLIBC_LDD || ALLYES
 	help
 	  ldd prints shared library dependencies of object files
+
+comment "glibc 'ldd' is selected"
+	depends on GLIBC_LDD
-- 
1.8.3.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] glibc: Make it possible to install ldd
  2013-08-14  9:34 [ptxdist] [PATCH] glibc: Make it possible to install ldd Bernhard Walle
@ 2013-08-14  9:48 ` Marc Kleine-Budde
  2013-08-14  9:59   ` Bernhard Walle
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2013-08-14  9:48 UTC (permalink / raw)
  To: ptxdist; +Cc: Bernhard Walle


[-- Attachment #1.1: Type: text/plain, Size: 826 bytes --]

On 08/14/2013 11:34 AM, Bernhard Walle wrote:
> The standalone ldd of ptxdist doesn't work with all toolchains.
> For example, for my ct-ng based toolchain, /lib/ld-linux-armhf.so.3
> must be in the RTLDLIST.
> 
> Instead of adding more intelligence to the script, we just install the
> ldd from the toolchain which already has the right RTLDLIST.
> 
> The patch also adds some guard for the standalone ldd to avoid selecting
> both variants in the configuration.

Does the ldd from the toolchain work with /bin/sh == busybox?

Marc


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] glibc: Make it possible to install ldd
  2013-08-14  9:48 ` Marc Kleine-Budde
@ 2013-08-14  9:59   ` Bernhard Walle
  0 siblings, 0 replies; 3+ messages in thread
From: Bernhard Walle @ 2013-08-14  9:59 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: ptxdist

* Marc Kleine-Budde <mkl@pengutronix.de> [2013-08-14 11:48]:
> On 08/14/2013 11:34 AM, Bernhard Walle wrote:
> > The standalone ldd of ptxdist doesn't work with all toolchains.
> > For example, for my ct-ng based toolchain, /lib/ld-linux-armhf.so.3
> > must be in the RTLDLIST.
> > 
> > Instead of adding more intelligence to the script, we just install the
> > ldd from the toolchain which already has the right RTLDLIST.
> > 
> > The patch also adds some guard for the standalone ldd to avoid selecting
> > both variants in the configuration.
> 
> Does the ldd from the toolchain work with /bin/sh == busybox?

Yes, because it has '#!/bin/bash' in the first line.

Well, that's indeed a problem. I personally tend to add bash to
"development" images (where I add ldd), so for me adding a bash
dependency would not be a problem.

Hm ....


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-14  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14  9:34 [ptxdist] [PATCH] glibc: Make it possible to install ldd Bernhard Walle
2013-08-14  9:48 ` Marc Kleine-Budde
2013-08-14  9:59   ` Bernhard Walle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox