mklibs patches: fix mklibs on powerpc, use correct ld.so
Hi all,
image-mklibs.bbclass was only looking for LSB binaries, which does not bode well with powerpc
mklibs script is searching for ld.so in /lib instead of sysroot, which also did not work well for me (powerpc has /lib/ld.so.1 and my x86_64 host has something completely different, and even if it was there it would be the wrong one).
Patches attached to avoid mangling in thunderbird.
Best regards,
Stefan
Signature · 6 lines
Stefan Seyfried Linux Consultant & Developer -- GPG Key: 0x731B665B B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
From b5acb1ead4a6e90dee6d3140dc302f143101893c Mon Sep 17 00:00:00 2001
From: Stefan Seyfried <[email protected]>
Date: Thu, 5 Dec 2013 10:48:08 +0100
Subject: [PATCH 1/2] mklibs: add patch to use the ld.so from sysroot
mklibs was looking for ld.so in the system, which is wrong. Look in sysroot instead.
--- .../mklibs/files/fix_linker_location.patch | 17 +++++++++++++++++ meta/recipes-devtools/mklibs/mklibs-native_0.1.38.bb | 1 + 2 files changed, 18 insertions(+) create mode 100644 meta/recipes-devtools/mklibs/files/fix_linker_location.patch
meta/recipes-devtools/mklibs/files/fix_linker_location.patch new file +17 -0
@@ -0,0 +1,17 @@ +Index: b/src/mklibs +=================================================================== +--- a/src/mklibs ++++ b/src/mklibs +@@ -493,11 +493,11 @@ while 1: + + # calculate what symbols are present in small_libs and available_libs + present_symbols = {} + checked_libs = small_libs + checked_libs.extend(available_libs) +- checked_libs.append(ldlib) ++ checked_libs.append(sysroot + ldlib) + for lib in checked_libs: + for symbol in provided_symbols(lib): + debug(DEBUG_SPAM, "present_symbols adding %s" % symbol) + names = symbol.base_names() + for name in names:
meta/recipes-devtools/mklibs/mklibs-native_0.1.38.bb +1 -0
@@ -8,6 +8,7 @@ DEPENDS = "python-native" SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.gz \ file://ac_init_fix.patch\ file://fix_STT_GNU_IFUNC.patch\ + file://fix_linker_location.patch \ " SRC_URI[md5sum] = "e597b01548204874feef396403615d9f"
Signature · 1 line
1.8.4.4
From 9cb07c1d3a9ed3a9bb3a4a1e06945fa03f72424a Mon Sep 17 00:00:00 2001
From: Stefan Seyfried <[email protected]>
Date: Thu, 5 Dec 2013 11:08:28 +0100
Subject: [PATCH 2/2] image-mklibs: also allow LSB binaries (powerpc...)
--- meta/classes/image-mklibs.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image-mklibs.bbclass +1 -1
@@ -9,7 +9,7 @@ mklibs_optimize_image_doit() { du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt for i in `find .`; do file $i; done \ | grep ELF \ - | grep "LSB *executable" \ + | grep "[LM]SB *executable" \ | grep "dynamically linked" \ | sed "s/:.*//" \ | sed "s+^\./++" \
Signature · 1 line
1.8.4.4
Hi Stefan,
Quoted 7 lines · On Sunday 08 December 2013 13:55:47 Stefan Seyfried wrote:
image-mklibs.bbclass was only looking for LSB binaries, which does not bode well with powerpc
mklibs script is searching for ld.so in /lib instead of sysroot, which also did not work well for me (powerpc has
/lib/ld.so.1and myx86_64host has something completely different, and even if it was there it would be the wrong one).
Poky tracks OpenEmbedded-Core (OE-Core), so these patches need to be sent there:
http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
Thanks,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre