Skip to contentSkip to conversation

libucontext: Fix multilib build

PATCH In review Khem Raj 2 participants 2 messages Mar 17, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 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

---
 .../0001-Makefile-Add-LIBDIR-variable.patch   | 46 +++++++++++++++++++
 meta/recipes-core/musl/libucontext_git.bb     |  3 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch
meta/recipes-core/musl/libucontext/0001-Makefile-Add-LIBDIR-variable.patch new file +46 -0
new file mode 100644
index 0000000000..4f91c8f189
@@ -0,0 +1,46 @@
+From 9bc3cedba54708c40c4a853b240c46e69f87de3c Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 17 Mar 2020 10:04:40 -0700
+Subject: [PATCH] Makefile: Add LIBDIR variable
+
+This ensures that it can be installed into custom location and also
+
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ ARCH := $(shell uname -m)
+-
++LIBDIR := /lib
+ CFLAGS = -ggdb3 -O2 -Wall -Iarch/${ARCH}
+ 
+ LIBUCONTEXT_C_SRC = $(wildcard arch/${ARCH}/*.c)
+@@ -10,8 +10,8 @@ LIBUCONTEXT_SOVERSION = 0
+ LIBUCONTEXT_NAME = libucontext.so
+ LIBUCONTEXT_STATIC_NAME = libucontext.a
+ LIBUCONTEXT_SONAME = libucontext.so.${LIBUCONTEXT_SOVERSION}
+-LIBUCONTEXT_PATH = /lib/${LIBUCONTEXT_SONAME}
+-LIBUCONTEXT_STATIC_PATH = /lib/${LIBUCONTEXT_STATIC_NAME}
++LIBUCONTEXT_PATH = ${LIBDIR}/${LIBUCONTEXT_SONAME}
++LIBUCONTEXT_STATIC_PATH = ${LIBDIR}/${LIBUCONTEXT_STATIC_NAME}
+ 
+ all: ${LIBUCONTEXT_SONAME} ${LIBUCONTEXT_STATIC_NAME}
+ 
+@@ -36,9 +36,9 @@ clean:
+ 		${LIBUCONTEXT_OBJ} test_libucontext
+ 
+ install: all
+-	install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}/${LIBUCONTEXT_PATH}
+-	install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}/${LIBUCONTEXT_STATIC_PATH}
+-	ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}/lib/${LIBUCONTEXT_NAME}
++	install -D -m755 ${LIBUCONTEXT_NAME} ${DESTDIR}${LIBUCONTEXT_PATH}
++	install -D -m664 ${LIBUCONTEXT_STATIC_NAME} ${DESTDIR}${LIBUCONTEXT_STATIC_PATH}
++	ln -sf ${LIBUCONTEXT_SONAME} ${DESTDIR}${LIBDIR}/${LIBUCONTEXT_NAME}
+ 
+ check: test_libucontext ${LIBUCONTEXT_SONAME}
+ 	env LD_LIBRARY_PATH=$(shell pwd) ./test_libucontext
meta/recipes-core/musl/libucontext_git.bb +2 -1
index 72e15aa9a4..92cb703b0b 100644
@@ -12,6 +12,7 @@ PV = "0.1.3+${SRCPV}"
 SRCREV = "e6b4d7516dae9b200e94fcfcb9ebc9331389655f"
 SRC_URI = "git://code.foxkit.us/adelie/libucontext.git;protocol=https \
            file://0001-pass-LDFLAGS-to-link-step.patch \
+           file://0001-Makefile-Add-LIBDIR-variable.patch \
 "
 
 S = "${WORKDIR}/git"
@@ -51,7 +52,7 @@ export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
 
 CFLAGS += "-Iarch/${ARCH}"
 
-EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
+EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'"
 
 do_compile() {
     oe_runmake ARCH=${ARCH}
Signature · 1 line
2.25.1
#1 lore raw

✗ patchtest: failure for libucontext: Fix multilib build

== Series Details ==

Series: libucontext: Fix multilib build
Revision: 1
URL : https://patchwork.openembedded.org/series/23281/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Upstream-Status is Submitted, but it is not mentioned where [test_upstream_status_presence_format]

  Suggested fix    Include where 0001-Makefile-Add-LIBDIR-variable.patch was submitted
  Current          Upstream-Status: Submitted
  Standard format  Upstream-Status: Submitted [where]

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe