From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] musl: Add aliases for glibc provided libraries
Date: Sun, 16 Sep 2018 08:53:13 -0700 [thread overview]
Message-ID: <20180916155313.18535-1-raj.khem@gmail.com> (raw)
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
Signee-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-core/musl/musl_git.bb | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index be31718e3a..a830c36eeb 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -26,6 +26,14 @@ DEPENDS = "virtual/${TARGET_PREFIX}binutils \
bsd-headers \
libssp-nonshared \
"
+GLIBC_LDSO ?= "ld.so.1"
+GLIBC_LDSO_arm = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ld-linux-armhf.so.3', 'ld-linux.so.3', d)}"
+GLIBC_LDSO_aarch64 = "ld-linux-aarch64.so.1"
+GLIBC_LDSO_x86 = "ld-linux.so.2"
+GLIBC_LDSO_x86_64 = "ld-linux-x86-64.so.2"
+GLIBC_LDSO_x32 = "ld-linux-x32.so.2"
+GLIBC_LDSO_powerpc64 = "ld64.so.1"
+GLIBC_LDSO_mips64 = "ld64.so.1"
export CROSS_COMPILE="${TARGET_PREFIX}"
@@ -62,10 +70,14 @@ 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}${base_libdir}/${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
}
RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev"
--
2.19.0
next reply other threads:[~2018-09-16 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-16 15:53 Khem Raj [this message]
2018-09-16 16:03 ` ✗ patchtest: failure for musl: Add aliases for glibc provided libraries Patchwork
2018-09-17 18:19 ` [PATCH] " Andre McCurdy
2018-09-17 21:43 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180916155313.18535-1-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox