]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcompat: Add recipe
authorKhem Raj <raj.khem@gmail.com>
Sat, 12 Jun 2021 19:43:14 +0000 (12:43 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 14 Jun 2021 14:05:08 +0000 (15:05 +0100)
This is a compat library which helps running pre-compiled binaries which were
compiled for glibc but needs to run on musl systems, this is quite
common case where pre-existing binaries are supplied and can not be
recompiled immediately

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/maintainers.inc
meta/recipes-core/musl/gcompat_git.bb [new file with mode: 0644]

index 71943ffe26923f5847c677f3255571e5fff1390b..e59f01d66a815825f585383b94a8213119ff4be5 100644 (file)
@@ -229,6 +229,7 @@ RECIPE_MAINTAINER_pn-gobject-introspection = "Alexander Kanavin <alex.kanavin@gm
 RECIPE_MAINTAINER_pn-gperf = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-gpgme = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-gptfdisk = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-gcompat = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-grep = "Denys Dmytriyenko <denis@denix.org>"
 RECIPE_MAINTAINER_pn-groff = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER_pn-grub = "Anuj Mittal <anuj.mittal@intel.com>"
diff --git a/meta/recipes-core/musl/gcompat_git.bb b/meta/recipes-core/musl/gcompat_git.bb
new file mode 100644 (file)
index 0000000..6792c0b
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright (C) 2021 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "A library which provides glibc-compatible APIs for use on musl libc systems"
+HOMEPAGE = "https://git.adelielinux.org/adelie/gcompat"
+
+LICENSE = "NCSA"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb33ef4af05a9c7602843afb7adfe792"
+
+SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current"
+
+PV = "1.0.0+1.1+git${SRCPV}"
+SRCREV = "af5a49e489fdc04b9cf02547650d7aeaccd43793"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig linuxloader
+
+DEPENDS += "musl-obstack"
+
+GLIBC_LDSO = "${@get_glibc_loader(d)}"
+MUSL_LDSO = "${@get_musl_loader(d)}"
+
+EXTRA_OEMAKE = "LINKER_PATH=${MUSL_LDSO} LOADER_NAME=`basename ${@get_glibc_loader(d)}`"
+
+do_configure () {
+       :
+}
+
+do_compile () {
+       oe_runmake
+}
+
+do_install () {
+       oe_runmake install 'DESTDIR=${D}'
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
+
+UPSTREAM_CHECK_COMMITS = "1"