From: Kai Kang <[email protected]>

Remove libLTO.so.* from llvm which should be provided by clang and
packaged to llvm-linker-tools. It could avoids the error:

ERROR: clang-16.0.6-r0 do_create_spdx: The recipe clang is trying to
       install files into a shared area when those files already exist.
       Those files and their manifest location are:
  /path_to/tmp/deploy/spdx/core2-64/packages/liblto16.spdx.json
    (matched in manifest-core2-64-llvm.create_spdx)
Please verify which recipe should provide the above files.

Signed-off-by: Kai Kang <[email protected]>
---
 meta/recipes-devtools/llvm/llvm_git.bb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb 
b/meta/recipes-devtools/llvm/llvm_git.bb
index f3d6f24bd2..ce9ebfa997 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -106,7 +106,7 @@ do_compile() {
 
 do_install() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; 
then
-       DESTDIR=${D} ninja -v install
+        DESTDIR=${D} ninja -v install
 
         # llvm harcodes usr/lib as install path, so this corrects it to actual 
libdir
         mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
@@ -117,6 +117,10 @@ do_install() {
 
         # reproducibility
         sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
+
+        # remove libLTO.so.* which should be provided by clang and packaged to
+        # llvm-linker-tools
+        rm -f ${D}/${libdir}/libLTO.so.*
     fi
 }
 
@@ -134,7 +138,7 @@ llvm_sysroot_preprocess() {
        ln -sf llvm-config 
${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
 }
 
-PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm 
${PN}-liboptremarks ${PN}-liblto"
+PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm 
${PN}-liboptremarks"
 
 RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello 
${PN}-liboptremarks"
 
@@ -146,10 +150,6 @@ FILES:${PN}-libllvm = "\
     ${libdir}/libLLVM-${MAJOR_VERSION}.so \
 "
 
-FILES:${PN}-liblto += "\
-    ${libdir}/libLTO.so.* \
-"
-
 FILES:${PN}-liboptremarks += "\
     ${libdir}/libRemarks.so.* \
 "
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#186419): 
https://lists.openembedded.org/g/openembedded-core/message/186419
Mute This Topic: https://lists.openembedded.org/mt/100866486/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to