diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-09-19 20:52:42 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-21 18:45:46 -0700 |
commit | 3b993fc618684896e492a7d3bdcaef65ec5aab54 (patch) | |
tree | b124ca3ce1cd9f4fd9e36ddaf49c5cd88ad78453 | |
parent | 244caa1dbf9dbfe67f1ea342be9fd0a296d116f9 (diff) | |
download | poky-3b993fc618684896e492a7d3bdcaef65ec5aab54.tar.gz |
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
(From OE-Core rev: 8ea0680462c506e01244d3fd3d35e6b2f805ada6)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/musl/musl_git.bb | 16 |
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 @@ | |||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | 2 | # Released under the MIT license (see COPYING.MIT for the terms) |
3 | 3 | ||
4 | require musl.inc | 4 | require musl.inc |
5 | inherit linuxloader | ||
5 | 6 | ||
6 | SRCREV = "0fa1e638e87cf257e9f96b4019b2076afd674a19" | 7 | SRCREV = "0fa1e638e87cf257e9f96b4019b2076afd674a19" |
7 | 8 | ||
@@ -26,6 +27,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}binutils \ | |||
26 | bsd-headers \ | 27 | bsd-headers \ |
27 | libssp-nonshared \ | 28 | libssp-nonshared \ |
28 | " | 29 | " |
30 | GLIBC_LDSO = "${@get_glibc_loader(d)}" | ||
29 | 31 | ||
30 | export CROSS_COMPILE="${TARGET_PREFIX}" | 32 | export CROSS_COMPILE="${TARGET_PREFIX}" |
31 | 33 | ||
@@ -62,12 +64,26 @@ do_install() { | |||
62 | install -d ${D}${bindir} | 64 | install -d ${D}${bindir} |
63 | rm -f ${D}${bindir}/ldd | 65 | rm -f ${D}${bindir}/ldd |
64 | lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd | 66 | lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd |
67 | lnr ${D}${libdir}/libc.so ${D}${GLIBC_LDSO} | ||
65 | for l in crypt dl m pthread resolv rt util xnet | 68 | for l in crypt dl m pthread resolv rt util xnet |
66 | do | 69 | do |
67 | ln -sf libc.so ${D}${libdir}/lib$l.so | 70 | ln -sf libc.so ${D}${libdir}/lib$l.so |
68 | done | 71 | done |
72 | 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 | ||
73 | ln -sf libc.so ${D}${libdir}/$i | ||
74 | done | ||
69 | } | 75 | } |
70 | 76 | ||
77 | PACKAGES =+ "${PN}-glibc-compat" | ||
78 | |||
79 | FILES_${PN}-glibc-compat += "\ | ||
80 | ${libdir}/libc.so.6 ${libdir}/libcrypt.so.1 \ | ||
81 | ${libdir}/libdl.so.2 ${libdir}/libm.so.6 \ | ||
82 | ${libdir}/libpthread.so.0 ${libdir}/libresolv.so.2 \ | ||
83 | ${libdir}/librt.so.1 ${libdir}/libutil.so.1 \ | ||
84 | ${GLIBC_LDSO} \ | ||
85 | " | ||
86 | |||
71 | RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev" | 87 | RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev" |
72 | RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev" | 88 | RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev" |
73 | RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)" | 89 | RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)" |