mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
libucontext: Add recipe
Help musl based systems provide ucontext APIs, these APIs are used in some common applications e.g. chromium browser (From OE-Core rev: 51c329d2d3fbefd5483bb78f471f4c222ad061c1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
71d47de3b7
commit
403b5e4b53
|
@ -386,6 +386,7 @@ RECIPE_MAINTAINER_pn-libtirpc = "Anuj Mittal <anuj.mittal@intel.com>"
|
||||||
RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
|
RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
|
||||||
RECIPE_MAINTAINER_pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>"
|
RECIPE_MAINTAINER_pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>"
|
||||||
RECIPE_MAINTAINER_pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>"
|
RECIPE_MAINTAINER_pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>"
|
||||||
|
RECIPE_MAINTAINER_pn-libucontext = "Khem Raj <raj.khem@gmail.com>"
|
||||||
RECIPE_MAINTAINER_pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>"
|
RECIPE_MAINTAINER_pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>"
|
||||||
RECIPE_MAINTAINER_pn-libunwind = "Bruce Ashfield <bruce.ashfield@gmail.com>"
|
RECIPE_MAINTAINER_pn-libunwind = "Bruce Ashfield <bruce.ashfield@gmail.com>"
|
||||||
RECIPE_MAINTAINER_pn-liburcu = "Alexander Kanavin <alex.kanavin@gmail.com>"
|
RECIPE_MAINTAINER_pn-liburcu = "Alexander Kanavin <alex.kanavin@gmail.com>"
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
From 12d45d250d08e96e889e38e77273c3ef73e6fc97 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Mon, 25 Nov 2019 15:07:35 -0800
|
||||||
|
Subject: [PATCH] pass LDFLAGS to link step
|
||||||
|
|
||||||
|
This helps to use OE specific linker flags and fixes
|
||||||
|
|
||||||
|
do_package_qa: QA Issue: No GNU_HASH in the ELF binary
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
Makefile | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 8a605fd..d1c9637 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -20,7 +20,7 @@ ${LIBUCONTEXT_STATIC_NAME}: ${LIBUCONTEXT_OBJ}
|
||||||
|
|
||||||
|
${LIBUCONTEXT_NAME}: ${LIBUCONTEXT_OBJ}
|
||||||
|
$(CC) -o ${LIBUCONTEXT_NAME} -Wl,-soname,${LIBUCONTEXT_SONAME} \
|
||||||
|
- -shared ${LIBUCONTEXT_OBJ}
|
||||||
|
+ -shared ${LIBUCONTEXT_OBJ} ${LDFLAGS}
|
||||||
|
|
||||||
|
${LIBUCONTEXT_SONAME}: ${LIBUCONTEXT_NAME}
|
||||||
|
ln -sf ${LIBUCONTEXT_NAME} ${LIBUCONTEXT_SONAME}
|
||||||
|
--
|
||||||
|
2.24.0
|
||||||
|
|
62
meta/recipes-core/musl/libucontext_git.bb
Normal file
62
meta/recipes-core/musl/libucontext_git.bb
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
# Copyright (C) 2019 Khem Raj <raj.khem@gmail.com>
|
||||||
|
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||||
|
|
||||||
|
SUMMARY = "ucontext implementation featuring glibc-compatible ABI"
|
||||||
|
HOMEPAGE = "https://github.com/kaniini/libucontext"
|
||||||
|
LICENSE = "ISC"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=864cc1445419406b7093e8e531c9515e"
|
||||||
|
SECTION = "libs"
|
||||||
|
DEPENDS = ""
|
||||||
|
|
||||||
|
PV = "0.1.3+${SRCPV}"
|
||||||
|
SRCREV = "e6b4d7516dae9b200e94fcfcb9ebc9331389655f"
|
||||||
|
SRC_URI = "git://code.foxkit.us/adelie/libucontext.git;protocol=https \
|
||||||
|
file://0001-pass-LDFLAGS-to-link-step.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
COMPATIBLE_HOST = ".*-musl.*"
|
||||||
|
|
||||||
|
valid_archs = "\
|
||||||
|
i386 x86 \
|
||||||
|
ppc powerpc powerpc64 ppc64 \
|
||||||
|
arm aarch64 \
|
||||||
|
s390 \
|
||||||
|
"
|
||||||
|
|
||||||
|
def map_kernel_arch(a, d):
|
||||||
|
import re
|
||||||
|
|
||||||
|
valid_archs = d.getVar('valid_archs').split()
|
||||||
|
|
||||||
|
if re.match('(i.86|athlon)$', a): return 'x86'
|
||||||
|
elif re.match('x86.64$', a): return 'x86_64'
|
||||||
|
elif re.match('armeb$', a): return 'arm'
|
||||||
|
elif re.match('aarch64$', a): return 'aarch64'
|
||||||
|
elif re.match('aarch64_be$', a): return 'aarch64'
|
||||||
|
elif re.match('aarch64_ilp32$', a): return 'aarch64'
|
||||||
|
elif re.match('aarch64_be_ilp32$', a): return 'aarch64'
|
||||||
|
elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'mips'
|
||||||
|
elif re.match('p(pc|owerpc)', a): return 'ppc'
|
||||||
|
elif re.match('p(pc64|owerpc64)', a): return 'ppc64'
|
||||||
|
elif re.match('riscv64$', a): return 'riscv64'
|
||||||
|
elif a in valid_archs: return a
|
||||||
|
else:
|
||||||
|
if not d.getVar("TARGET_OS").startswith("linux"):
|
||||||
|
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}"
|
||||||
|
|
||||||
|
EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
|
||||||
|
|
||||||
|
do_compile() {
|
||||||
|
oe_runmake ARCH=${ARCH}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
oe_runmake ARCH="${ARCH}" DESTDIR="${D}" install
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user