From 7c3f2f61536cc8e0322087558cdcfe29ee2fac6d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 4 Mar 2016 16:28:40 +0000 Subject: linuxloader/image-prelink/image-mklibs: Fix non-standard path prelinking Prelinking on x86-64 wasn't working out the box as it uses /lib and not /lib64 for libs. Prelink was refusing to link as the dynamic loader didn't match its idea of the right path. Passing in the --dyanmic-linker option avoids this. We can share code from image-mklibs so abstract that into a new class, linuxloader.bbclass. This does break prelinking of multilib images, I've opened a bug so we can loop back and fix that problem, the code would need to iterate the dynamic loaders (and setup ld.so.conf files for it). Signed-off-by: Richard Purdie --- meta/classes/image-prelink.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/classes/image-prelink.bbclass') diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass index 53c4b0b112..e153f47881 100644 --- a/meta/classes/image-prelink.bbclass +++ b/meta/classes/image-prelink.bbclass @@ -6,6 +6,8 @@ python prelink_setup () { oe.utils.write_ld_so_conf(d) } +inherit linuxloader + prelink_image () { # export PSEUDO_DEBUG=4 # /bin/env | /bin/grep PSEUDO @@ -31,8 +33,10 @@ prelink_image () { fi cat ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf >> $ldsoconf + dynamic_loader=$(linuxloader) + # prelink! - ${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf + ${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader # Remove the prelink.conf if we had to add it. if [ "$dummy_prelink_conf" = "true" ]; then -- cgit v1.2.3