diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-03-11 23:26:25 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-15 14:37:40 +0000 |
commit | 028fcc234840dee58cc3c5e74ce3e44d0ebedb55 (patch) | |
tree | 54ce4b724e8c2ac249cc410ba80a38d0a980c0f8 /meta | |
parent | 603e14dc680837610dfa6eca8a54a2e14b61c94a (diff) | |
download | poky-028fcc234840dee58cc3c5e74ce3e44d0ebedb55.tar.gz |
libunwind: Link with libucontext on musl
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
(From OE-Core rev: 824c07d1cf2d1574dfe8f395af37479064782426)
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-support/libunwind/libunwind.inc | 1 | ||||
-rw-r--r-- | meta/recipes-support/libunwind/libunwind_1.5.0.bb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-support/libunwind/libunwind.inc b/meta/recipes-support/libunwind/libunwind.inc index 76a1bf6246..17ba151933 100644 --- a/meta/recipes-support/libunwind/libunwind.inc +++ b/meta/recipes-support/libunwind/libunwind.inc | |||
@@ -4,6 +4,7 @@ HOMEPAGE = "http://www.nongnu.org/libunwind" | |||
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f" |
6 | DEPENDS += "libatomic-ops" | 6 | DEPENDS += "libatomic-ops" |
7 | DEPENDS_append_libc-musl = " libucontext" | ||
7 | 8 | ||
8 | inherit autotools multilib_header | 9 | inherit autotools multilib_header |
9 | 10 | ||
diff --git a/meta/recipes-support/libunwind/libunwind_1.5.0.bb b/meta/recipes-support/libunwind/libunwind_1.5.0.bb index 887a35708e..6392cac5c9 100644 --- a/meta/recipes-support/libunwind/libunwind_1.5.0.bb +++ b/meta/recipes-support/libunwind/libunwind_1.5.0.bb | |||
@@ -25,3 +25,4 @@ COMPATIBLE_HOST_riscv32 = "null" | |||
25 | LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" | 25 | LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" |
26 | 26 | ||
27 | SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared" | 27 | SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared" |
28 | CACHED_CONFIGUREVARS_append_libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'" | ||