summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/musl/musl.inc26
-rw-r--r--meta/recipes-core/musl/musl_git.bb58
2 files changed, 84 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/musl.inc b/meta/recipes-core/musl/musl.inc
new file mode 100644
index 0000000000..c3fd5c874a
--- /dev/null
+++ b/meta/recipes-core/musl/musl.inc
@@ -0,0 +1,26 @@
1# Copyright (C) 2014 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "An implementation of the standard library for Linux-based systems"
5DESCRIPTION = "A new standard library to power a new generation of Linux-based devices. \
6musl is lightweight, fast, simple, free, and strives to be correct in the sense of \
7standards-conformance and safety."
8
9HOMEPAGE = "http://www.musl-libc.org/"
10LICENSE = "MIT"
11SECTION = "libs"
12LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bccdfe36b123d1b0757d8025278d86ba"
13
14PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
15TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
16
17INHIBIT_DEFAULT_DEPS = "1"
18
19STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
20STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
21
22
23FILES_SOLIBSDEV = ""
24FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
25INSANE_SKIP_${PN} = "dev-so"
26
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
new file mode 100644
index 0000000000..1feb436667
--- /dev/null
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -0,0 +1,58 @@
1# Copyright (C) 2014 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4require musl.inc
5
6SRCREV = "6c5cad2aa56745302c1d42d2c8baf6424d29c0f3"
7
8PV = "1.1.11+git${SRCPV}"
9
10# mirror is at git://github.com/bminor/musl.git
11
12SRC_URI = "git://git.musl-libc.org/musl \
13 "
14
15S = "${WORKDIR}/git"
16
17PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl"
18
19DEPENDS = "virtual/${TARGET_PREFIX}binutils \
20 virtual/${TARGET_PREFIX}gcc-initial \
21 libgcc-initial \
22 "
23
24export CROSS_COMPILE="${TARGET_PREFIX}"
25
26EXTRA_OEMAKE = ""
27
28LDFLAGS += "-Wl,-soname,libc.so"
29
30CONFIGUREOPTS = " \
31 --prefix=${prefix} \
32 --exec-prefix=${exec_prefix} \
33 --bindir=${bindir} \
34 --libdir=${libdir} \
35 --includedir=${includedir} \
36 --syslibdir=${base_libdir} \
37"
38
39do_configure() {
40 ${S}/configure ${CONFIGUREOPTS}
41}
42
43do_compile() {
44 oe_runmake
45}
46
47do_install() {
48 oe_runmake install DESTDIR='${D}'
49
50 install -d ${D}${bindir}
51 ln -s ${libdir}/libc.so ${D}${bindir}/ldd
52}
53
54RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
55RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
56RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)"
57
58LEAD_SONAME = "libc.so"