Skip to content

Commit

Permalink
compiler-rt-sanitizers: Package a symlink to address headers include …
Browse files Browse the repository at this point in the history
…issue

Instead of moving the whole install under major.minor.patch, create a symlink
so both can be included

Fixes kraj#978

Signed-off-by: Khem Raj <[email protected]>
Signed-off-by: Ludovic Jozeau <[email protected]>

(cherry picked from commit a219212)
  • Loading branch information
kraj authored and FederAndInk committed Aug 12, 2024
1 parent 52c61cd commit e313b19
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions recipes-devtools/clang/compiler-rt-sanitizers_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit e313b19

Please sign in to comment.