summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/musl/libucontext_git.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-05-30 08:57:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-31 14:31:02 +0100
commit21a919c821ad7c7e5dc29d4e8d4b9f9ca95c75bb (patch)
tree88e9d9c6dde989ed51dada58fe45b92c3be68f3b /meta/recipes-core/musl/libucontext_git.bb
parentaa0f01f1cde42b2e65bfa9b34981860fc135f0d6 (diff)
downloadpoky-21a919c821ad7c7e5dc29d4e8d4b9f9ca95c75bb.tar.gz
libucontext: Switch to meson build system
cross compiling with meson is easier than the plain makefile build method that libucontext has, there were bunch of problems passing compiler and make variables, compounded by the fact that makefile decided on some compiler flags internally and thought that cflags are synthesized completely in makefile and not passed from environment like OE is doing. As a result some features were not being compiled in e.g. function name aliases were missing meson, on the other hand is cleaner and we have to add a patch to support cpu architecture on meson cmdline, everything else pretty much works out of box (From OE-Core rev: 6e186e75d62e1afabd19a339924b66eac1418274) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/musl/libucontext_git.bb')
-rw-r--r--meta/recipes-core/musl/libucontext_git.bb18
1 files changed, 4 insertions, 14 deletions
diff --git a/meta/recipes-core/musl/libucontext_git.bb b/meta/recipes-core/musl/libucontext_git.bb
index 0b64867ce0..d8ae8242c5 100644
--- a/meta/recipes-core/musl/libucontext_git.bb
+++ b/meta/recipes-core/musl/libucontext_git.bb
@@ -11,7 +11,8 @@ DEPENDS = ""
11PV = "1.1+${SRCPV}" 11PV = "1.1+${SRCPV}"
12SRCREV = "335ee864ef6f4a5d4b525453fd9dbfb3507cfecc" 12SRCREV = "335ee864ef6f4a5d4b525453fd9dbfb3507cfecc"
13SRC_URI = "git://github.com/kaniini/libucontext \ 13SRC_URI = "git://github.com/kaniini/libucontext \
14" 14 file://0001-meson-Add-option-to-pass-cpu.patch \
15 "
15 16
16S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
17 18
@@ -49,16 +50,5 @@ def map_kernel_arch(a, d):
49 return a 50 return a
50 bb.error("cannot map '%s' to a linux kernel architecture" % a) 51 bb.error("cannot map '%s' to a linux kernel architecture" % a)
51 52
52export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" 53EXTRA_OEMESON = "-Dcpu=${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
53 54inherit meson
54CFLAGS += "-Iarch/${ARCH} -Iarch/common"
55
56EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'"
57
58do_compile() {
59 oe_runmake ARCH=${ARCH}
60}
61
62do_install() {
63 oe_runmake ARCH="${ARCH}" DESTDIR="${D}" install
64}