summaryrefslogtreecommitdiffstats
path: root/meta/classes/image-mklibs.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-04 16:28:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-07 00:11:40 +0000
commitae85c4b9a6609523c293173843679733b1ede7ba (patch)
tree9a110d52b2cd54f428acea5e787c274b2309eddc /meta/classes/image-mklibs.bbclass
parent0b84897ea813a4f7a8b198efcc7ac335debf19d9 (diff)
downloadpoky-ae85c4b9a6609523c293173843679733b1ede7ba.tar.gz
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). (From OE-Core rev: 7c3f2f61536cc8e0322087558cdcfe29ee2fac6d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image-mklibs.bbclass')
-rw-r--r--meta/classes/image-mklibs.bbclass23
1 files changed, 3 insertions, 20 deletions
diff --git a/meta/classes/image-mklibs.bbclass b/meta/classes/image-mklibs.bbclass
index cfb3ffc91e..6c0e8dcf35 100644
--- a/meta/classes/image-mklibs.bbclass
+++ b/meta/classes/image-mklibs.bbclass
@@ -2,6 +2,8 @@ do_rootfs[depends] += "mklibs-native:do_populate_sysroot"
2 2
3IMAGE_PREPROCESS_COMMAND += "mklibs_optimize_image; " 3IMAGE_PREPROCESS_COMMAND += "mklibs_optimize_image; "
4 4
5inherit linuxloader
6
5mklibs_optimize_image_doit() { 7mklibs_optimize_image_doit() {
6 rm -rf ${WORKDIR}/mklibs 8 rm -rf ${WORKDIR}/mklibs
7 mkdir -p ${WORKDIR}/mklibs/dest 9 mkdir -p ${WORKDIR}/mklibs/dest
@@ -15,26 +17,7 @@ mklibs_optimize_image_doit() {
15 | sed "s+^\./++" \ 17 | sed "s+^\./++" \
16 > ${WORKDIR}/mklibs/executables.list 18 > ${WORKDIR}/mklibs/executables.list
17 19
18 case ${TARGET_ARCH} in 20 dynamic_loader=$(linuxloader)
19 powerpc | mips | mipsel | microblaze )
20 dynamic_loader="${base_libdir}/ld.so.1"
21 ;;
22 powerpc64)
23 dynamic_loader="${base_libdir}/ld64.so.1"
24 ;;
25 x86_64)
26 dynamic_loader="${base_libdir}/ld-linux-x86-64.so.2"
27 ;;
28 i*86 )
29 dynamic_loader="${base_libdir}/ld-linux.so.2"
30 ;;
31 arm )
32 dynamic_loader="${base_libdir}/ld-linux.so.3"
33 ;;
34 * )
35 dynamic_loader="/unknown_dynamic_linker"
36 ;;
37 esac
38 21
39 mklibs -v \ 22 mklibs -v \
40 --ldlib ${dynamic_loader} \ 23 --ldlib ${dynamic_loader} \