Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] libucontext: Fix multilib build
@ 2020-03-17 18:32 Khem Raj
  2020-03-17 19:02 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2020-03-17 18:32 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../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

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 @@
+From 9bc3cedba54708c40c4a853b240c46e69f87de3c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ 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
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}"
 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}
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ patchtest: failure for libucontext: Fix multilib build
  2020-03-17 18:32 [PATCH] libucontext: Fix multilib build Khem Raj
@ 2020-03-17 19:02 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2020-03-17 19:02 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

== 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 (openembedded-core@lists.openembedded.org) 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-17 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-17 18:32 [PATCH] libucontext: Fix multilib build Khem Raj
2020-03-17 19:02 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox