diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-05-28 17:37:52 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-09-08 09:08:54 -0700 |
commit | 142241ab389838cc449fdac26a21b2c8a06fb4b4 (patch) | |
tree | b34d1c700886f03bf0ef50cce315a26265bb15fd | |
parent | 44bbbd9e4555cf9d1c076f01c2fe98f07214c51f (diff) | |
download | meta-clang-142241ab389838cc449fdac26a21b2c8a06fb4b4.tar.gz |
libunwind: Install headers and pkgconfig file
This ensures it can replace nongnu libunwind
Use it only when selecting RUNTIME = "llvm"
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit c48de926ac54802df7e1e4b7f91caa4fa4ef45b1)
-rw-r--r-- | recipes-devtools/clang/clang/libunwind.pc.in | 9 | ||||
-rw-r--r-- | recipes-devtools/clang/common.inc | 1 | ||||
-rw-r--r-- | recipes-devtools/clang/libcxx_git.bb | 11 |
3 files changed, 21 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/libunwind.pc.in b/recipes-devtools/clang/clang/libunwind.pc.in new file mode 100644 index 0000000..a93d676 --- /dev/null +++ b/recipes-devtools/clang/clang/libunwind.pc.in | |||
@@ -0,0 +1,9 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=/usr | ||
3 | libdir=@LIBDIR@ | ||
4 | includedir=/usr/include | ||
5 | |||
6 | Name: libunwind | ||
7 | Description: libunwind base library | ||
8 | Version: @VERSION@ | ||
9 | Libs: -lunwind | ||
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index 8046c35..d68d6f5 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc | |||
@@ -9,6 +9,7 @@ BASEURI ??= "${LLVM_GIT}/llvm-project;protocol=${LLVM_GIT_PROTOCOL};branch=${BRA | |||
9 | SRC_URI = "\ | 9 | SRC_URI = "\ |
10 | ${BASEURI} \ | 10 | ${BASEURI} \ |
11 | file://llvm-config \ | 11 | file://llvm-config \ |
12 | file://libunwind.pc.in \ | ||
12 | file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \ | 13 | file://0001-lldb-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \ |
13 | file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ | 14 | file://0002-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch \ |
14 | file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \ | 15 | file://0003-compiler-rt-support-a-new-embedded-linux-target.patch \ |
diff --git a/recipes-devtools/clang/libcxx_git.bb b/recipes-devtools/clang/libcxx_git.bb index c179006..ef330dd 100644 --- a/recipes-devtools/clang/libcxx_git.bb +++ b/recipes-devtools/clang/libcxx_git.bb | |||
@@ -77,5 +77,16 @@ ALLOW_EMPTY_${PN} = "1" | |||
77 | 77 | ||
78 | PROVIDES += "${@bb.utils.contains("RUNTIME", "llvm", "libunwind", "", d)}" | 78 | PROVIDES += "${@bb.utils.contains("RUNTIME", "llvm", "libunwind", "", d)}" |
79 | 79 | ||
80 | |||
81 | do_install_append() { | ||
82 | if ${@bb.utils.contains("RUNTIME", "llvm", "true", "false", d)} | ||
83 | then | ||
84 | install -Dm 0644 ${S}/libunwind/include/libunwind.h ${S}/libunwind/include/__libunwind_config.h ${D}${includedir} | ||
85 | install -Dm 0644 ${S}/libunwind/include/unwind.h ${D}${includedir}/unwind.h | ||
86 | install -d ${D}${libdir}/pkgconfig | ||
87 | sed -e 's,@LIBDIR@,${libdir},g;s,@VERSION@,${PV},g' ${S}/../libunwind.pc.in > ${D}${libdir}/pkgconfig/libunwind.pc | ||
88 | fi | ||
89 | } | ||
90 | |||
80 | BBCLASSEXTEND = "native nativesdk" | 91 | BBCLASSEXTEND = "native nativesdk" |
81 | TOOLCHAIN = "clang" | 92 | TOOLCHAIN = "clang" |