Skip to content

Commit

Permalink
libunwind: Install headers and pkgconfig file
Browse files Browse the repository at this point in the history
This ensures it can replace nongnu libunwind
Use it only when selecting RUNTIME = "llvm"

Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed Jun 8, 2021
1 parent 9337952 commit c48de92
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions recipes-devtools/clang/clang/libunwind.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
prefix=/usr
exec_prefix=/usr
libdir=@LIBDIR@
includedir=/usr/include

Name: libunwind
Description: libunwind base library
Version: @VERSION@
Libs: -lunwind
1 change: 1 addition & 0 deletions recipes-devtools/clang/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRA
SRC_URI = "\
${BASEURI} \
file://llvm-config \
file://libunwind.pc.in \
file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \
file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \
file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \
Expand Down
11 changes: 11 additions & 0 deletions recipes-devtools/clang/libcxx_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,16 @@ ALLOW_EMPTY_${PN} = "1"

PROVIDES += "${@bb.utils.contains("RUNTIME", "llvm", "libunwind", "", d)}"


do_install_append() {
if ${@bb.utils.contains("RUNTIME", "llvm", "true", "false", d)}
then
install -Dm 0644 ${S}/libunwind/include/libunwind.h ${S}/libunwind/include/__libunwind_config.h ${D}${includedir}
install -Dm 0644 ${S}/libunwind/include/unwind.h ${D}${includedir}/unwind.h
install -d ${D}${libdir}/pkgconfig
sed -e 's,@LIBDIR@,${libdir},g;s,@VERSION@,${PV},g' ${S}/../libunwind.pc.in > ${D}${libdir}/pkgconfig/libunwind.pc
fi
}

BBCLASSEXTEND = "native nativesdk"
TOOLCHAIN = "clang"

0 comments on commit c48de92

Please sign in to comment.