Skip to contentSkip to conversation

eglibc:

PATCH In review Thomas Zimmermann 5 participants 10 messages Feb 12, 2010 – Feb 19, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eglibc:

* ldd has shebang #!/bin/bash: so add bash RDEPNDS
* add libpthread_nonshared.a to eglibc-dev, needed for building multithreaded apps on the device

---
 recipes/eglibc/eglibc-package.bbclass |    3 ++-
 recipes/eglibc/eglibc.inc             |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
recipes/eglibc/eglibc-package.bbclass +2 -1
index fcaba47..7187363 100644
@@ -45,10 +45,11 @@ libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${ba
 
 FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig', '', d)}"
 FILES_ldd = "${bindir}/ldd"
+RDEPENDS_ldd = "bash"
 FILES_libsegfault = "${base_libdir}/libSegFault*"
 FILES_eglibc-extra-nss = "${base_libdir}/libnss*"
 FILES_sln = "/sbin/sln"
-FILES_eglibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen ${libdir}/libc_nonshared.a"
+FILES_eglibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen ${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a"
 FILES_nscd = "${sbindir}/nscd*"
 FILES_eglibc-utils = "${bindir}/* ${sbindir}/*"
 FILES_eglibc-gconv = "${libdir}/gconv/*"
recipes/eglibc/eglibc.inc +1 -1
index 356b838..5c06ae6 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"
 SECTION = "libs"
 PRIORITY = "required"
 LICENSE = "LGPL"
-INC_PR = "r8"
+INC_PR = "r9"
 # nptl needs unwind support in gcc, which can't be built without glibc.
 DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
 #this leads to circular deps, so lets not add it yet
Signature · 1 line
1.6.6.1
#1 lore raw

Hi, you probably would like to modify the subject :)

-- ynezz

#2 lore raw

Re: [PATCH] eglibc: small packaging fixes

Am Freitag 12 Februar 2010 14:08:43 schrieb Petr Štetiar:

Quoted 3 lines

Hi, you probably would like to modify the subject :)

-- ynezz

I had no idea for a good summery.
But this patch needs to be ACK'ed so i think we can add a better subject when commiting.

Thomas

#3 lore raw
In reply to Thomas Zimmermann
Quoted 3 lines · Thomas Zimmermann

* ldd has shebang #!/bin/bash: so add bash RDEPNDS
* add libpthread_nonshared.a to eglibc-dev, needed for building multithreaded apps on the device

patch is ok.

Quoted 44 lines

---
 recipes/eglibc/eglibc-package.bbclass |    3 ++-
 recipes/eglibc/eglibc.inc             |    2 +-

 2 files changed, 3 insertions(+), 2 deletions(-)
recipes/eglibc/eglibc-package.bbclass +0 -0
index fcaba47..7187363 100644
@@ -45,10 +45,11 @@ libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${ba
 

 FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig', '', d)}" FILES_ldd = "${bindir}/ldd"
+RDEPENDS_ldd = "bash"
 FILES_libsegfault = "${base_libdir}/libSegFault*"
 FILES_eglibc-extra-nss = "${base_libdir}/libnss*"
 FILES_sln = "/sbin/sln"

recipes/eglibc/eglibc-package.bbclass +1 -1
-FILES_eglibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen ${libdir}/libc_nonshared.a"
+FILES_eglibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen ${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a"

 FILES_nscd = "${sbindir}/nscd*"
 FILES_eglibc-utils = "${bindir}/* ${sbindir}/*"
 FILES_eglibc-gconv = "${libdir}/gconv/*"

recipes/eglibc/eglibc.inc +0 -0
index 356b838..5c06ae6 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"

 SECTION = "libs"
 PRIORITY = "required"
 LICENSE = "LGPL"

recipes/eglibc/eglibc.inc +1 -1
-INC_PR = "r8"
+INC_PR = "r9"
 # nptl needs unwind support in gcc, which can't be built without glibc.
 DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
 #this leads to circular deps, so lets not add it yet
--
1.6.6.1

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#4 lore raw
In reply to Thomas Zimmermann

Hi,

Quoted 1 line · Thomas Zimmermann

* ldd has shebang #!/bin/bash: so add bash RDEPNDS

last time I checked it worked with the Busybox built-in shell as well. I wonder if it would be a good idea to verify this and patch ldd for our purposes.

Greetings

Florian

Signature · 5 lines
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        [email protected]
                                        http://www.kernelconcepts.de/en
#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Florian Boor

Hi,

Quoted 1 line · Thomas Zimmermann

* ldd has shebang #!/bin/bash: so add bash RDEPNDS

last time I checked it worked with the Busybox built-in shell as well. I wonder if it would be a good idea to verify this and patch ldd for our purposes.

like this:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/glibc/glibc-2.4/ldd-unbash.patch
?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLeHtGMkyGM64RGpERAh6qAKCWso8PlsudZmYBWHY5xR9KyWxYWQCfdHTf 5P8Zv9JKV8DLJzC29+nqh3E=
=uFhP
-----END PGP SIGNATURE-----

#6 lore raw
Quoted 7 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 3 lines · Florian Boor

Hi,

Thomas Zimmermann schrieb:

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

* ldd has shebang #!/bin/bash: so add bash RDEPNDS

last time I checked it worked with the Busybox built-in shell as well. I wonder if it would be a good idea to verify this and patch ldd for our purposes.

like this:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/glibc/glibc-2.4/ldd-unbash.patch
?

or patch posted in http://sourceware.org/bugzilla/show_bug.cgi?id=832
it lets it work as it is if shell is bash.

Thx

-Khem

#7 lore raw

Am Freitag 19 Februar 2010 01:28:57 schrieb Khem Raj:

Quoted 1 line

On Sun, Feb 14, 2010 at 2:37 PM, Koen Kooi <[email protected]>

Quoted 17 lines · wrote:
Quoted 9 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Florian Boor

Hi,

Quoted 1 line · Thomas Zimmermann

* ldd has shebang #!/bin/bash: so add bash RDEPNDS

Quoted 7 lines
Quoted 3 lines

last time I checked it worked with the Busybox built-in shell as well. I wonder if it would be a good idea to verify this and patch ldd for our purposes.

like this:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/glibc/gli
bc-2.4/ldd-unbash.patch ?

Quoted 6 lines

or patch posted in http://sourceware.org/bugzilla/show_bug.cgi?id=832
it lets it work as it is if shell is bash.

Thx

-Khem

I tried ldd today with busyboy and it was enough to replace just the shebang:

usr/bin/ldd Fri Feb 19 08:27:51 2010 renamed from usr/bin/ldd Fri Feb 19 08:27:44 2010 +1 -1
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
 # Copyright (C) 1996-2008, 2009 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 

I think this is because we have in eglibc:

if x=set -o && test "$x" != "${x#*pipefail}" && set -o pipefail ; then

and the second term fails, so set -o pipefail is never executed.

I will resend this patch.

Thomas

#8 lore raw
Quoted 38 lines · Thomas Zimmermann

Am Freitag 19 Februar 2010 01:28:57 schrieb Khem Raj:

Quoted 1 line

On Sun, Feb 14, 2010 at 2:37 PM, Koen Kooi <[email protected]>

Quoted 17 lines · wrote:
Quoted 9 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Florian Boor

Hi,

Quoted 1 line · Thomas Zimmermann

* ldd has shebang #!/bin/bash: so add bash RDEPNDS

Quoted 7 lines
Quoted 3 lines

last time I checked it worked with the Busybox built-in shell as well. I wonder if it would be a good idea to verify this and patch ldd for our purposes.

like this:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/glibc/gli
bc-2.4/ldd-unbash.patch ?

Quoted 6 lines

or patch posted in http://sourceware.org/bugzilla/show_bug.cgi?id=832
it lets it work as it is if shell is bash.

Thx

-Khem

I tried ldd today with busyboy and it was enough to replace just the shebang:

usr/bin/ldd        Fri Feb 19 08:27:51 2010 renamed from usr/bin/ldd        Fri Feb 19 08:27:44 2010 +1 -1
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
  # Copyright (C) 1996-2008, 2009 Free Software Foundation, Inc.
  # This file is part of the GNU C Library.
 

I think this is because we have in eglibc:

Quoted 3 lines

if x=set -o && test "$x" != "${x#*pipefail}" && set -o pipefail ; then

and the second term fails, so set -o pipefail is never executed.

yes thats right.

Quoted 10 lines

I will resend this patch.

Thomas

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#9 lore raw

PATCH 1/1 eglibc: unbash ldd and add libpthread_nonshared.a to -dev

In reply to Thomas Zimmermann

* replace shebang of ldd by /bin/sh, so ldd doesn't depend on bash anymore. Tested with busybox sh.
* added to do_configure_prepend because do_patch is only a python function
* add libpthread_nonshared.a to eglibc-dev. Now it's possible to compile multithreaded applications on the device.

---
 recipes/eglibc/eglibc-package.bbclass |    6 +++++-
 recipes/eglibc/eglibc.inc             |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
recipes/eglibc/eglibc-package.bbclass +5 -1
index fcaba47..3c33f93 100644
@@ -48,7 +48,7 @@ FILES_ldd = "${bindir}/ldd"
 FILES_libsegfault = "${base_libdir}/libSegFault*"
 FILES_eglibc-extra-nss = "${base_libdir}/libnss*"
 FILES_sln = "/sbin/sln"
-FILES_eglibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen ${libdir}/libc_nonshared.a"
+FILES_eglibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen ${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a"
 FILES_nscd = "${sbindir}/nscd*"
 FILES_eglibc-utils = "${bindir}/* ${sbindir}/*"
 FILES_eglibc-gconv = "${libdir}/gconv/*"
@@ -76,6 +76,10 @@ EXTRA_OECONF += "${@get_eglibc_fpu_setting(bb, d)}"
 
 OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
 
+do_configure_prepend() {
+        sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
+}
+
 do_install() {
 	oe_runmake install_root=${D} install
 	for r in ${rpcsvc}; do
recipes/eglibc/eglibc.inc +1 -1
index 356b838..5c06ae6 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home"
 SECTION = "libs"
 PRIORITY = "required"
 LICENSE = "LGPL"
-INC_PR = "r8"
+INC_PR = "r9"
 # nptl needs unwind support in gcc, which can't be built without glibc.
 DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
 #this leads to circular deps, so lets not add it yet
Signature · 1 line
1.7.0