musl is posix compliant C library for linux

Signed-off-by: Khem Raj <[email protected]>
---
 meta/recipes-core/musl/musl.inc    | 26 +++++++++++++++++
 meta/recipes-core/musl/musl_git.bb | 58 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 meta/recipes-core/musl/musl.inc
 create mode 100644 meta/recipes-core/musl/musl_git.bb

diff --git a/meta/recipes-core/musl/musl.inc b/meta/recipes-core/musl/musl.inc
new file mode 100644
index 0000000..c3fd5c8
--- /dev/null
+++ b/meta/recipes-core/musl/musl.inc
@@ -0,0 +1,26 @@
+# Copyright (C) 2014 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "An implementation of the standard library for Linux-based systems"
+DESCRIPTION = "A new standard library to power a new generation of Linux-based 
devices. \
+musl is lightweight, fast, simple, free, and strives to be correct in the 
sense of \
+standards-conformance and safety."
+
+HOMEPAGE = "http://www.musl-libc.org/";
+LICENSE = "MIT"
+SECTION = "libs"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bccdfe36b123d1b0757d8025278d86ba"
+
+PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
+TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
+
+
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
+INSANE_SKIP_${PN} = "dev-so"
+
diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
new file mode 100644
index 0000000..1feb436
--- /dev/null
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -0,0 +1,58 @@
+# Copyright (C) 2014 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require musl.inc
+
+SRCREV = "6c5cad2aa56745302c1d42d2c8baf6424d29c0f3"
+
+PV = "1.1.11+git${SRCPV}"
+
+# mirror is at git://github.com/bminor/musl.git
+
+SRC_URI = "git://git.musl-libc.org/musl \
+          "
+
+S = "${WORKDIR}/git"
+
+PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc 
virtual/libiconv virtual/libintl"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils \
+           virtual/${TARGET_PREFIX}gcc-initial \
+           libgcc-initial \
+          "
+
+export CROSS_COMPILE="${TARGET_PREFIX}"
+
+EXTRA_OEMAKE = ""
+
+LDFLAGS += "-Wl,-soname,libc.so"
+
+CONFIGUREOPTS = " \
+    --prefix=${prefix} \
+    --exec-prefix=${exec_prefix} \
+    --bindir=${bindir} \
+    --libdir=${libdir} \
+    --includedir=${includedir} \
+    --syslibdir=${base_libdir} \
+"
+
+do_configure() {
+       ${S}/configure ${CONFIGUREOPTS}
+}
+
+do_compile() {
+       oe_runmake
+}
+
+do_install() {
+       oe_runmake install DESTDIR='${D}'
+
+       install -d ${D}${bindir}
+       ln -s ${libdir}/libc.so ${D}${bindir}/ldd
+}
+
+RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
+RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
+RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)"
+
+LEAD_SONAME = "libc.so"
-- 
2.6.3

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to