diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/conf/distro/include/maintainers.inc | 1 | ||||
-rw-r--r-- | meta/recipes-core/musl/libucontext/0001-pass-LDFLAGS-to-link-step.patch | 31 | ||||
-rw-r--r-- | meta/recipes-core/musl/libucontext_git.bb | 62 |
3 files changed, 94 insertions, 0 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 01afc25b93..a80e85a2f6 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc | |||
@@ -386,6 +386,7 @@ RECIPE_MAINTAINER_pn-libtirpc = "Anuj Mittal <anuj.mittal@intel.com>" | |||
386 | RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>" | 386 | RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>" |
387 | RECIPE_MAINTAINER_pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>" | 387 | RECIPE_MAINTAINER_pn-libtool-cross = "Robert Yang <liezhi.yang@windriver.com>" |
388 | RECIPE_MAINTAINER_pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>" | 388 | RECIPE_MAINTAINER_pn-libtool-native = "Robert Yang <liezhi.yang@windriver.com>" |
389 | RECIPE_MAINTAINER_pn-libucontext = "Khem Raj <raj.khem@gmail.com>" | ||
389 | RECIPE_MAINTAINER_pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>" | 390 | RECIPE_MAINTAINER_pn-libunistring = "Anuj Mittal <anuj.mittal@intel.com>" |
390 | RECIPE_MAINTAINER_pn-libunwind = "Bruce Ashfield <bruce.ashfield@gmail.com>" | 391 | RECIPE_MAINTAINER_pn-libunwind = "Bruce Ashfield <bruce.ashfield@gmail.com>" |
391 | RECIPE_MAINTAINER_pn-liburcu = "Alexander Kanavin <alex.kanavin@gmail.com>" | 392 | RECIPE_MAINTAINER_pn-liburcu = "Alexander Kanavin <alex.kanavin@gmail.com>" |
diff --git a/meta/recipes-core/musl/libucontext/0001-pass-LDFLAGS-to-link-step.patch b/meta/recipes-core/musl/libucontext/0001-pass-LDFLAGS-to-link-step.patch new file mode 100644 index 0000000000..0ab8caf3e6 --- /dev/null +++ b/meta/recipes-core/musl/libucontext/0001-pass-LDFLAGS-to-link-step.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 12d45d250d08e96e889e38e77273c3ef73e6fc97 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 25 Nov 2019 15:07:35 -0800 | ||
4 | Subject: [PATCH] pass LDFLAGS to link step | ||
5 | |||
6 | This helps to use OE specific linker flags and fixes | ||
7 | |||
8 | do_package_qa: QA Issue: No GNU_HASH in the ELF binary | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | Makefile | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/Makefile b/Makefile | ||
17 | index 8a605fd..d1c9637 100644 | ||
18 | --- a/Makefile | ||
19 | +++ b/Makefile | ||
20 | @@ -20,7 +20,7 @@ ${LIBUCONTEXT_STATIC_NAME}: ${LIBUCONTEXT_OBJ} | ||
21 | |||
22 | ${LIBUCONTEXT_NAME}: ${LIBUCONTEXT_OBJ} | ||
23 | $(CC) -o ${LIBUCONTEXT_NAME} -Wl,-soname,${LIBUCONTEXT_SONAME} \ | ||
24 | - -shared ${LIBUCONTEXT_OBJ} | ||
25 | + -shared ${LIBUCONTEXT_OBJ} ${LDFLAGS} | ||
26 | |||
27 | ${LIBUCONTEXT_SONAME}: ${LIBUCONTEXT_NAME} | ||
28 | ln -sf ${LIBUCONTEXT_NAME} ${LIBUCONTEXT_SONAME} | ||
29 | -- | ||
30 | 2.24.0 | ||
31 | |||
diff --git a/meta/recipes-core/musl/libucontext_git.bb b/meta/recipes-core/musl/libucontext_git.bb new file mode 100644 index 0000000000..72e15aa9a4 --- /dev/null +++ b/meta/recipes-core/musl/libucontext_git.bb | |||
@@ -0,0 +1,62 @@ | |||
1 | # Copyright (C) 2019 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | SUMMARY = "ucontext implementation featuring glibc-compatible ABI" | ||
5 | HOMEPAGE = "https://github.com/kaniini/libucontext" | ||
6 | LICENSE = "ISC" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=864cc1445419406b7093e8e531c9515e" | ||
8 | SECTION = "libs" | ||
9 | DEPENDS = "" | ||
10 | |||
11 | PV = "0.1.3+${SRCPV}" | ||
12 | SRCREV = "e6b4d7516dae9b200e94fcfcb9ebc9331389655f" | ||
13 | SRC_URI = "git://code.foxkit.us/adelie/libucontext.git;protocol=https \ | ||
14 | file://0001-pass-LDFLAGS-to-link-step.patch \ | ||
15 | " | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | COMPATIBLE_HOST = ".*-musl.*" | ||
20 | |||
21 | valid_archs = "\ | ||
22 | i386 x86 \ | ||
23 | ppc powerpc powerpc64 ppc64 \ | ||
24 | arm aarch64 \ | ||
25 | s390 \ | ||
26 | " | ||
27 | |||
28 | def map_kernel_arch(a, d): | ||
29 | import re | ||
30 | |||
31 | valid_archs = d.getVar('valid_archs').split() | ||
32 | |||
33 | if re.match('(i.86|athlon)$', a): return 'x86' | ||
34 | elif re.match('x86.64$', a): return 'x86_64' | ||
35 | elif re.match('armeb$', a): return 'arm' | ||
36 | elif re.match('aarch64$', a): return 'aarch64' | ||
37 | elif re.match('aarch64_be$', a): return 'aarch64' | ||
38 | elif re.match('aarch64_ilp32$', a): return 'aarch64' | ||
39 | elif re.match('aarch64_be_ilp32$', a): return 'aarch64' | ||
40 | elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'mips' | ||
41 | elif re.match('p(pc|owerpc)', a): return 'ppc' | ||
42 | elif re.match('p(pc64|owerpc64)', a): return 'ppc64' | ||
43 | elif re.match('riscv64$', a): return 'riscv64' | ||
44 | elif a in valid_archs: return a | ||
45 | else: | ||
46 | if not d.getVar("TARGET_OS").startswith("linux"): | ||
47 | return a | ||
48 | bb.error("cannot map '%s' to a linux kernel architecture" % a) | ||
49 | |||
50 | export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" | ||
51 | |||
52 | CFLAGS += "-Iarch/${ARCH}" | ||
53 | |||
54 | EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" | ||
55 | |||
56 | do_compile() { | ||
57 | oe_runmake ARCH=${ARCH} | ||
58 | } | ||
59 | |||
60 | do_install() { | ||
61 | oe_runmake ARCH="${ARCH}" DESTDIR="${D}" install | ||
62 | } | ||