summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/musl/libucontext_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/musl/libucontext_git.bb')
-rw-r--r--meta/recipes-core/musl/libucontext_git.bb64
1 files changed, 0 insertions, 64 deletions
diff --git a/meta/recipes-core/musl/libucontext_git.bb b/meta/recipes-core/musl/libucontext_git.bb
deleted file mode 100644
index 734ad9c953..0000000000
--- a/meta/recipes-core/musl/libucontext_git.bb
+++ /dev/null
@@ -1,64 +0,0 @@
1# Copyright (C) 2019 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "ucontext implementation featuring glibc-compatible ABI"
5HOMEPAGE = "https://github.com/kaniini/libucontext"
6LICENSE = "ISC"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=6eed01fa0e673c76f5a5715438f65b1d"
8SECTION = "libs"
9DEPENDS = ""
10
11PV = "0.10+${SRCPV}"
12SRCREV = "19fa1bbfc26efb92147b5e85cc0ca02a0e837561"
13SRC_URI = "git://github.com/kaniini/libucontext \
14"
15
16S = "${WORKDIR}/git"
17
18COMPATIBLE_HOST = ".*-musl.*"
19
20valid_archs = " \
21 x86 x86_64 \
22 ppc ppc64 \
23 mips mips64 \
24 arm aarch64 \
25 s390x \
26"
27
28def map_kernel_arch(a, d):
29 import re
30
31 valid_archs = d.getVar('valid_archs').split()
32
33 if a in valid_archs: return a
34 elif re.match('(i.86|athlon)$', a): return 'x86'
35 elif re.match('x86.64$', a): return 'x86_64'
36 elif re.match('armeb$', a): return 'arm'
37 elif re.match('aarch64$', a): return 'aarch64'
38 elif re.match('aarch64_be$', a): return 'aarch64'
39 elif re.match('aarch64_ilp32$', a): return 'aarch64'
40 elif re.match('aarch64_be_ilp32$', a): return 'aarch64'
41 elif re.match('mips(isa|)(32|)(r6|)(el|)$', a): return 'mips'
42 elif re.match('mips(isa|)64(r6|)(el|)$', a): return 'mips64'
43 elif re.match('p(pc|owerpc)', a): return 'ppc'
44 elif re.match('p(pc64|owerpc64)', a): return 'ppc64'
45 elif re.match('riscv64$', a): return 'riscv64'
46 elif re.match('riscv32$', a): return 'riscv32'
47 else:
48 if not d.getVar("TARGET_OS").startswith("linux"):
49 return a
50 bb.error("cannot map '%s' to a linux kernel architecture" % a)
51
52export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
53
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}