From 21a919c821ad7c7e5dc29d4e8d4b9f9ca95c75bb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 30 May 2021 08:57:34 -0700 Subject: 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 Signed-off-by: Richard Purdie --- meta/recipes-core/musl/libucontext_git.bb | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'meta/recipes-core/musl/libucontext_git.bb') 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 = "" PV = "1.1+${SRCPV}" SRCREV = "335ee864ef6f4a5d4b525453fd9dbfb3507cfecc" SRC_URI = "git://github.com/kaniini/libucontext \ -" + file://0001-meson-Add-option-to-pass-cpu.patch \ + " S = "${WORKDIR}/git" @@ -49,16 +50,5 @@ def map_kernel_arch(a, d): return a bb.error("cannot map '%s' to a linux kernel architecture" % a) -export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" - -CFLAGS += "-Iarch/${ARCH} -Iarch/common" - -EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'" - -do_compile() { - oe_runmake ARCH=${ARCH} -} - -do_install() { - oe_runmake ARCH="${ARCH}" DESTDIR="${D}" install -} +EXTRA_OEMESON = "-Dcpu=${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" +inherit meson -- cgit v1.2.3-54-g00ecf