summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-03-17 11:32:20 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-21 22:39:00 +0000
commit795bc2361653fa7e1e084b975056a6a4efe7f1d9 (patch)
treeeb5e98bac169216c5540f494602ebaf9ac031646 /meta
parent2f6a47c4d4dc24135b69ed01e193740c24f269e8 (diff)
downloadpoky-795bc2361653fa7e1e084b975056a6a4efe7f1d9.tar.gz
libucontext: Fix multilib build
libdir is hardcoded to /lib which is not going to work in multilib scene, patch makefile to add a variable to override the libdir from env (From OE-Core rev: 75b29a68f11f9c10a89ba413abd1023cfcf90982) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch46
-rw-r--r--meta/recipes-core/musl/libucontext_git.bb3
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 @@
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_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}"
12SRCREV = "e6b4d7516dae9b200e94fcfcb9ebc9331389655f" 12SRCREV = "e6b4d7516dae9b200e94fcfcb9ebc9331389655f"
13SRC_URI = "git://code.foxkit.us/adelie/libucontext.git;protocol=https \ 13SRC_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
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
@@ -51,7 +52,7 @@ export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
51 52
52CFLAGS += "-Iarch/${ARCH}" 53CFLAGS += "-Iarch/${ARCH}"
53 54
54EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" 55EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'"
55 56
56do_compile() { 57do_compile() {
57 oe_runmake ARCH=${ARCH} 58 oe_runmake ARCH=${ARCH}