From e313b19daf8cf93ec90540390068a3f7c7f1ebe4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 8 Aug 2024 23:27:21 -0700 Subject: [PATCH] compiler-rt-sanitizers: Package a symlink to address headers include issue Instead of moving the whole install under major.minor.patch, create a symlink so both can be included Fixes https://github.com/kraj/meta-clang/issues/978 Signed-off-by: Khem Raj Signed-off-by: Ludovic Jozeau (cherry picked from commit a2192126094e2152c49becdf281899626abaebed) --- .../clang/compiler-rt-sanitizers_git.bb | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb index a128aa24..8b937e03 100644 --- a/recipes-devtools/clang/compiler-rt-sanitizers_git.bb +++ b/recipes-devtools/clang/compiler-rt-sanitizers_git.bb @@ -71,25 +71,25 @@ EXTRA_OECMAKE:append:powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc " do_install:append () { if [ -n "${LLVM_LIBDIR_SUFFIX}" ]; then mkdir -p ${D}${nonarch_libdir}/clang - mv ${D}${libdir}/clang/${MAJOR_VER} ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER} + mv ${D}${libdir}/clang/${MAJOR_VER} ${D}${nonarch_libdir}/clang/${MAJOR_VER} rmdir --ignore-fail-on-non-empty ${D}${libdir} - else - mv ${D}${libdir}/clang/${MAJOR_VER} ${D}${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER} fi + ln -sf ${MAJOR_VER} ${D}${libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER} # Already shipped with compile-rt Orc support - rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/liborc_rt-*.a - rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/include/orc/ + rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/liborc_rt-*.a + rm -rf ${D}${nonarch_libdir}/clang/${MAJOR_VER}/include/orc/ } FILES_SOLIBSDEV = "" -FILES:${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ - ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \ - ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt" -FILES:${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" -FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ - ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/include \ - ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \ - ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.asan-preinit*.a" +FILES:${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER} \ + ${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/lib*${SOLIBSDEV} \ + ${nonarch_libdir}/clang/${MAJOR_VER}/*.txt \ + ${nonarch_libdir}/clang/${MAJOR_VER}/share/*.txt" +FILES:${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/*.a" +FILES:${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/*.syms \ + ${nonarch_libdir}/clang/${MAJOR_VER}/include \ + ${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/clang_rt.crt*.o \ + ${nonarch_libdir}/clang/${MAJOR_VER}/lib/linux/libclang_rt.asan-preinit*.a" INSANE_SKIP:${PN} = "dev-so libdir" INSANE_SKIP:${PN}-dbg = "libdir"