diff options
Diffstat (limited to 'meta/recipes-core/musl/libucontext_1.2.bb')
-rw-r--r-- | meta/recipes-core/musl/libucontext_1.2.bb | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/libucontext_1.2.bb b/meta/recipes-core/musl/libucontext_1.2.bb new file mode 100644 index 0000000000..4e34df1439 --- /dev/null +++ b/meta/recipes-core/musl/libucontext_1.2.bb | |||
@@ -0,0 +1,52 @@ | |||
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=ebea527af0602d509b7f4c49533fb1bd" | ||
8 | SECTION = "libs" | ||
9 | DEPENDS = "" | ||
10 | |||
11 | SRCREV = "4dde3417b4bb4b1b1545bd913be337680b5e28c3" | ||
12 | SRC_URI = "git://github.com/kaniini/libucontext;branch=master;protocol=https \ | ||
13 | " | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | COMPATIBLE_HOST = ".*-musl.*" | ||
18 | |||
19 | valid_archs = " \ | ||
20 | x86 x86_64 \ | ||
21 | ppc ppc64 \ | ||
22 | mips mips64 \ | ||
23 | arm aarch64 \ | ||
24 | s390x \ | ||
25 | " | ||
26 | |||
27 | def map_kernel_arch(a, d): | ||
28 | import re | ||
29 | |||
30 | valid_archs = d.getVar('valid_archs').split() | ||
31 | |||
32 | if a in valid_archs: return a | ||
33 | elif 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|)(r6|)(el|)$', a): return 'mips' | ||
41 | elif re.match('mips(isa|)64(r6|)(el|)$', a): return 'mips64' | ||
42 | elif re.match('p(pc64|owerpc64)(le)', a): return 'ppc64' | ||
43 | elif re.match('p(pc|owerpc)', a): return 'ppc' | ||
44 | elif re.match('riscv64$', a): return 'riscv64' | ||
45 | elif re.match('riscv32$', a): return 'riscv32' | ||
46 | else: | ||
47 | if not d.getVar("TARGET_OS").startswith("linux"): | ||
48 | return a | ||
49 | bb.error("cannot map '%s' to a linux kernel architecture" % a) | ||
50 | |||
51 | EXTRA_OEMESON = "-Dcpu=${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" | ||
52 | inherit meson | ||