From: Mark Hatle <mark.ha...@windriver.com>

aarch64 requires the ld.so to be present in /lib, even if the rest
of the libraries are installed into an alternative directory.

See: https://sourceware.org/glibc/wiki/ABIList

Signed-off-by: Mark Hatle <mark.ha...@windriver.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 6212e5b..984362e 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -32,6 +32,8 @@ RPROVIDES_glibc-thread-db = "eglibc-thread-db"
 RPROVIDES_${PN}-pcprofile = "eglibc-pcprofile"
 RPROVIDES_${PN}-dbg = "eglibc-dbg"
 libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so 
${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* 
${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so 
${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so 
${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so 
${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so 
${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so 
${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so 
${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so 
${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so 
${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so 
${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so 
${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so 
${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
+libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1"
+INSANE_SKIP_glibc_append_aarch64 = " libdir"
 
 FILES_${PN} = "${libc_baselibs} ${libexecdir}/* 
${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig 
${sysconfdir}/ld.so.conf', '', d)}"
 FILES_ldd = "${bindir}/ldd"
@@ -103,6 +105,20 @@ do_install_append () {
        fi
 }
 
+do_install_append_aarch64 () {
+       if [ "${base_libdir}" != "/lib" ] ; then
+               # The aarch64 ABI says the dynamic linker -must- be 
/lib/ld-linux-aarch64[_be].so.1
+               install -d ${D}/lib
+               if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then
+                       ln -s ${@base_path_relative('/lib', 
'${base_libdir}')}/ld-linux-aarch64.so.1 \
+                               ${D}/lib/ld-linux-aarch64.so.1
+               elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then
+                       ln -s ${@base_path_relative('/lib', 
'${base_libdir}')}/ld-linux-aarch64_be.so.1 \
+                               ${D}/lib/ld-linux-aarch64_be.so.1
+               fi
+       fi
+}
+
 do_install_locale () {
        dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
        install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} 
${dest}${datadir}
-- 
1.9.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to