summaryrefslogtreecommitdiff
path: root/meta/classes/linuxloader.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:10:24 +0000
commit7c3f2f61536cc8e0322087558cdcfe29ee2fac6d (patch)
treef0c0ca9bfcd00a147f6efe9078b7a1c70a35e240 /meta/classes/linuxloader.bbclass
parent7fd1d7e639c2ed7e0699937a5cb245c187b7c811 (diff)
downloadopenembedded-core-7c3f2f61536cc8e0322087558cdcfe29ee2fac6d.tar.gz
openembedded-core-7c3f2f61536cc8e0322087558cdcfe29ee2fac6d.tar.bz2
openembedded-core-7c3f2f61536cc8e0322087558cdcfe29ee2fac6d.zip
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/linuxloader.bbclass')
-rw-r--r--meta/classes/linuxloader.bbclass24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/classes/linuxloader.bbclass b/meta/classes/linuxloader.bbclass
new file mode 100644
index 0000000000..5c4dc5c51b
--- /dev/null
+++ b/meta/classes/linuxloader.bbclass
@@ -0,0 +1,24 @@
+
+linuxloader () {
+ case ${TARGET_ARCH} in
+ powerpc | mips | mipsel | microblaze )
+ dynamic_loader="${base_libdir}/ld.so.1"
+ ;;
+ powerpc64)
+ dynamic_loader="${base_libdir}/ld64.so.1"
+ ;;
+ x86_64)
+ dynamic_loader="${base_libdir}/ld-linux-x86-64.so.2"
+ ;;
+ i*86 )
+ dynamic_loader="${base_libdir}/ld-linux.so.2"
+ ;;
+ arm )
+ dynamic_loader="${base_libdir}/ld-linux.so.3"
+ ;;
+ * )
+ dynamic_loader="/unknown_dynamic_linker"
+ ;;
+ esac
+ echo $dynamic_loader
+}