diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch | 46 | ||||
-rw-r--r-- | meta/recipes-core/musl/libucontext_git.bb | 3 |
2 files changed, 48 insertions, 1 deletions
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 new file mode 100644 index 0000000000..4f91c8f189 --- /dev/null +++ b/meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 9bc3cedba54708c40c4a853b240c46e69f87de3c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 17 Mar 2020 10:04:40 -0700 | ||
4 | Subject: [PATCH] Makefile: Add LIBDIR variable | ||
5 | |||
6 | This ensures that it can be installed into custom location and also | ||
7 | |||
8 | Upstream-Status: Submitted | ||
9 | Signed-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_git.bb b/meta/recipes-core/musl/libucontext_git.bb index 72e15aa9a4..92cb703b0b 100644 --- a/meta/recipes-core/musl/libucontext_git.bb +++ b/meta/recipes-core/musl/libucontext_git.bb | |||
@@ -12,6 +12,7 @@ PV = "0.1.3+${SRCPV}" | |||
12 | SRCREV = "e6b4d7516dae9b200e94fcfcb9ebc9331389655f" | 12 | SRCREV = "e6b4d7516dae9b200e94fcfcb9ebc9331389655f" |
13 | SRC_URI = "git://code.foxkit.us/adelie/libucontext.git;protocol=https \ | 13 | SRC_URI = "git://code.foxkit.us/adelie/libucontext.git;protocol=https \ |
14 | file://0001-pass-LDFLAGS-to-link-step.patch \ | 14 | file://0001-pass-LDFLAGS-to-link-step.patch \ |
15 | file://0001-Makefile-Add-LIBDIR-variable.patch \ | ||
15 | " | 16 | " |
16 | 17 | ||
17 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
@@ -51,7 +52,7 @@ export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" | |||
51 | 52 | ||
52 | CFLAGS += "-Iarch/${ARCH}" | 53 | CFLAGS += "-Iarch/${ARCH}" |
53 | 54 | ||
54 | EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" | 55 | EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'" |
55 | 56 | ||
56 | do_compile() { | 57 | do_compile() { |
57 | oe_runmake ARCH=${ARCH} | 58 | oe_runmake ARCH=${ARCH} |