summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/musl/0001-Remove-using-.end-directive-with-clang.patch36
-rw-r--r--meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch46
-rw-r--r--meta/recipes-core/musl/libucontext/0001-pass-LDFLAGS-to-link-step.patch31
-rw-r--r--meta/recipes-core/musl/libucontext_git.bb48
4 files changed, 60 insertions, 101 deletions
diff --git a/meta/recipes-core/musl/0001-Remove-using-.end-directive-with-clang.patch b/meta/recipes-core/musl/0001-Remove-using-.end-directive-with-clang.patch
new file mode 100644
index 0000000000..be79cb53f1
--- /dev/null
+++ b/meta/recipes-core/musl/0001-Remove-using-.end-directive-with-clang.patch
@@ -0,0 +1,36 @@
1From b6732f68848ecc8ff01054bf7aea70a241c37116 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 10 Apr 2020 11:23:39 -0700
4Subject: [PATCH] Remove using .end directive with clang
5
6Clang does not support this asm directive
7Fixes Issue #19
8
9Upstream-Status: Submitted [https://github.com/kaniini/libucontext/pull/20]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 arch/common/common-defs.h | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15diff --git a/arch/common/common-defs.h b/arch/common/common-defs.h
16index bf2fb8c..618116b 100644
17--- a/arch/common/common-defs.h
18+++ b/arch/common/common-defs.h
19@@ -28,10 +28,13 @@
20 ENT(__proc) \
21 __proc: \
22 SETUP_FRAME(__proc)
23-
24+#ifdef __clang__
25+#define END(__proc)
26+#else
27 #define END(__proc) \
28 .end __proc; \
29 .size __proc,.-__proc;
30+#endif
31
32 #define ALIAS(__alias, __real) \
33 .weak __alias; \
34--
352.26.0
36
diff --git a/meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch b/meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch
deleted file mode 100644
index 4f91c8f189..0000000000
--- a/meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 9bc3cedba54708c40c4a853b240c46e69f87de3c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 17 Mar 2020 10:04:40 -0700
4Subject: [PATCH] Makefile: Add LIBDIR variable
5
6This ensures that it can be installed into custom location and also
7
8Upstream-Status: Submitted
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 Makefile | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
13
14--- a/Makefile
15+++ b/Makefile
16@@ -1,5 +1,5 @@
17 ARCH := $(shell uname -m)
18-
19+LIBDIR := /lib
20 CFLAGS = -ggdb3 -O2 -Wall -Iarch/${ARCH}
21
22 LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c)
23@@ -10,8 +10,8 @@ LIBUCONTEXT_SOVERSION = 0
24 LIBUCONTEXT_NAME = libucontext.so
25 LIBUCONTEXT_STATIC_NAME = libucontext.a
26 LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION}
27-LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME}
28-LIBUCONTEXT_STATIC_PATH = /lib/${LIBUCONTEXT_STATIC_NAME}
29+LIBUCONTEXT_PATH = ${LIBDIR}/${LIBUCONTEXT_SONAME}
30+LIBUCONTEXT_STATIC_PATH = ${LIBDIR}/${LIBUCONTEXT_STATIC_NAME}
31
32 all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME}
33
34@@ -36,9 +36,9 @@ clean:
35 ${LIBUCONTEXT_OBJ} test_libucontext
36
37 install: all
38- install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}/${LIBUCONTEXT_PATH}
39- install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}/${LIBUCONTEXT_STATIC_PATH}
40- ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}/lib/${LIBUCONTEXT_NAME}
41+ install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}${LIBUCONTEXT_PATH}
42+ install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}${LIBUCONTEXT_STATIC_PATH}
43+ ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}${LIBDIR}/${LIBUCONTEXT_NAME}
44
45 check: test_libucontext ${LIBUCONTEXT_SONAME}
46 env LD_LIBRARY_PATH=$(shell pwd) ./test_libucontext
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
deleted file mode 100644
index 0ab8caf3e6..0000000000
--- a/meta/recipes-core/musl/libucontext/0001-pass-LDFLAGS-to-link-step.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 12d45d250d08e96e889e38e77273c3ef73e6fc97 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 25 Nov 2019 15:07:35 -0800
4Subject: [PATCH] pass LDFLAGS to link step
5
6This helps to use OE specific linker flags and fixes
7
8do_package_qa: QA Issue: No GNU_HASH in the ELF binary
9
10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/Makefile b/Makefile
17index 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--
302.24.0
31
diff --git a/meta/recipes-core/musl/libucontext_git.bb b/meta/recipes-core/musl/libucontext_git.bb
index 92cb703b0b..ec988f1920 100644
--- a/meta/recipes-core/musl/libucontext_git.bb
+++ b/meta/recipes-core/musl/libucontext_git.bb
@@ -4,26 +4,25 @@
4SUMMARY = "ucontext implementation featuring glibc-compatible ABI" 4SUMMARY = "ucontext implementation featuring glibc-compatible ABI"
5HOMEPAGE = "https://github.com/kaniini/libucontext" 5HOMEPAGE = "https://github.com/kaniini/libucontext"
6LICENSE = "ISC" 6LICENSE = "ISC"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=864cc1445419406b7093e8e531c9515e" 7LIC_FILES_CHKSUM = "file://LICENSE;md5=6eed01fa0e673c76f5a5715438f65b1d"
8SECTION = "libs" 8SECTION = "libs"
9DEPENDS = "" 9DEPENDS = ""
10 10
11PV = "0.1.3+${SRCPV}" 11PV = "0.10+${SRCPV}"
12SRCREV = "e6b4d7516dae9b200e94fcfcb9ebc9331389655f" 12SRCREV = "19fa1bbfc26efb92147b5e85cc0ca02a0e837561"
13SRC_URI = "git://code.foxkit.us/adelie/libucontext.git;protocol=https \ 13SRC_URI = "git://github.com/kaniini/libucontext \
14 file://0001-pass-LDFLAGS-to-link-step.patch \
15 file://0001-Makefile-Add-LIBDIR-variable.patch \
16" 14"
17 15
18S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
19 17
20COMPATIBLE_HOST = ".*-musl.*" 18COMPATIBLE_HOST = ".*-musl.*"
21 19
22valid_archs = "\ 20valid_archs = " \
23i386 x86 \ 21 x86 x86_64 \
24ppc powerpc powerpc64 ppc64 \ 22 ppc ppc64 \
25arm aarch64 \ 23 mips mips64 \
26s390 \ 24 arm aarch64 \
25 s390x \
27" 26"
28 27
29def map_kernel_arch(a, d): 28def map_kernel_arch(a, d):
@@ -31,18 +30,19 @@ def map_kernel_arch(a, d):
31 30
32 valid_archs = d.getVar('valid_archs').split() 31 valid_archs = d.getVar('valid_archs').split()
33 32
34 if re.match('(i.86|athlon)$', a): return 'x86' 33 if a in valid_archs: return a
35 elif re.match('x86.64$', a): return 'x86_64' 34 elif re.match('(i.86|athlon)$', a): return 'x86'
36 elif re.match('armeb$', a): return 'arm' 35 elif re.match('x86.64$', a): return 'x86_64'
37 elif re.match('aarch64$', a): return 'aarch64' 36 elif re.match('armeb$', a): return 'arm'
38 elif re.match('aarch64_be$', a): return 'aarch64' 37 elif re.match('aarch64$', a): return 'aarch64'
39 elif re.match('aarch64_ilp32$', a): return 'aarch64' 38 elif re.match('aarch64_be$', a): return 'aarch64'
40 elif re.match('aarch64_be_ilp32$', a): return 'aarch64' 39 elif re.match('aarch64_ilp32$', a): return 'aarch64'
41 elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'mips' 40 elif re.match('aarch64_be_ilp32$', a): return 'aarch64'
42 elif re.match('p(pc|owerpc)', a): return 'ppc' 41 elif re.match('mips(isa|)(32|)(r6|)(el|)$', a): return 'mips'
43 elif re.match('p(pc64|owerpc64)', a): return 'ppc64' 42 elif re.match('mips(isa|)64(r6|)(el|)$', a): return 'mips64'
44 elif re.match('riscv64$', a): return 'riscv64' 43 elif re.match('p(pc|owerpc)', a): return 'ppc'
45 elif a in valid_archs: return a 44 elif re.match('p(pc64|owerpc64)', a): return 'ppc64'
45 elif re.match('riscv64$', a): return 'riscv64'
46 else: 46 else:
47 if not d.getVar("TARGET_OS").startswith("linux"): 47 if not d.getVar("TARGET_OS").startswith("linux"):
48 return a 48 return a
@@ -50,7 +50,7 @@ def map_kernel_arch(a, d):
50 50
51export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" 51export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
52 52
53CFLAGS += "-Iarch/${ARCH}" 53CFLAGS += "-Iarch/${ARCH} -Iarch/common"
54 54
55EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'" 55EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'"
56 56