summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-19 20:52:42 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-20 12:24:04 -0700
commit8ea0680462c506e01244d3fd3d35e6b2f805ada6 (patch)
tree94bb05e8ac0b6060e7b41ce423e2605fb4dd3a44
parent0a02ea79ec522582b46138a027eb166819e5647d (diff)
downloadopenembedded-core-contrib-8ea0680462c506e01244d3fd3d35e6b2f805ada6.tar.gz
openembedded-core-contrib-8ea0680462c506e01244d3fd3d35e6b2f805ada6.tar.bz2
openembedded-core-contrib-8ea0680462c506e01244d3fd3d35e6b2f805ada6.zip
musl: Add aliases for glibc provided libraries
This is a step towards running pebuilt applications for glibc on musl There are many realworld applications which are not always built from source, especially provided by third party Package the glibc symlinks into new package musl-glibc-compat Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-core/musl/musl_git.bb16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index be31718e3a..f0556533b5 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -2,6 +2,7 @@
# Released under the MIT license (see COPYING.MIT for the terms)
require musl.inc
+inherit linuxloader
SRCREV = "0fa1e638e87cf257e9f96b4019b2076afd674a19"
@@ -26,6 +27,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}binutils \
bsd-headers \
libssp-nonshared \
"
+GLIBC_LDSO = "${@get_glibc_loader(d)}"
export CROSS_COMPILE="${TARGET_PREFIX}"
@@ -62,12 +64,26 @@ do_install() {
install -d ${D}${bindir}
rm -f ${D}${bindir}/ldd
lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd
+ lnr ${D}${libdir}/libc.so ${D}${GLIBC_LDSO}
for l in crypt dl m pthread resolv rt util xnet
do
ln -sf libc.so ${D}${libdir}/lib$l.so
done
+ for i in libc.so.6 libcrypt.so.1 libdl.so.2 libm.so.6 libpthread.so.0 libresolv.so.2 librt.so.1 libutil.so.1; do
+ ln -sf libc.so ${D}${libdir}/$i
+ done
}
+PACKAGES =+ "${PN}-glibc-compat"
+
+FILES_${PN}-glibc-compat += "\
+ ${libdir}/libc.so.6 ${libdir}/libcrypt.so.1 \
+ ${libdir}/libdl.so.2 ${libdir}/libm.so.6 \
+ ${libdir}/libpthread.so.0 ${libdir}/libresolv.so.2 \
+ ${libdir}/librt.so.1 ${libdir}/libutil.so.1 \
+ ${GLIBC_LDSO} \
+ "
+
RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev"
RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)"