]> code.ossystems Code Review - openembedded-core.git/commitdiff
libunwind: Link with libucontext on musl
authorKhem Raj <raj.khem@gmail.com>
Fri, 12 Mar 2021 07:26:25 +0000 (23:26 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Mar 2021 14:37:35 +0000 (14:37 +0000)
Functions like unw_getcontext in libunwind call getcontext() which are
not part of musl C library like glibc, however there is a supplimental
library providing these functions called libucontext, therefore link
libunwind with a static version of this library to resolve such symbols,
this inturn helps packages needing libunwind, who look for certain
APIs in libunwind during configure e.g. heaptrack

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-support/libunwind/libunwind.inc
meta/recipes-support/libunwind/libunwind_1.5.0.bb

index 76a1bf6246b1bfa56d2fbbd249244755444149bc..17ba15193387e5d593d40107b176b29bfcb3660c 100644 (file)
@@ -4,6 +4,7 @@ HOMEPAGE = "http://www.nongnu.org/libunwind"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
 DEPENDS += "libatomic-ops"
+DEPENDS_append_libc-musl = " libucontext"
 
 inherit autotools multilib_header
 
index 887a35708e8f70b9fc910848ab50b95ebed86431..6392cac5c938055f257cc454170a479b17e4b42e 100644 (file)
@@ -25,3 +25,4 @@ COMPATIBLE_HOST_riscv32 = "null"
 LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
 
 SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared"
+CACHED_CONFIGUREVARS_append_libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'"