summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/compiler-rt_git.bb
diff options
context:
space:
mode:
authorDaniel McGregor <daniel.mcgregor@vecima.com>2019-01-22 18:55:44 -0600
committerKhem Raj <raj.khem@gmail.com>2020-01-20 08:56:16 -0800
commitcda1376a97b86d6ae5c92fd931f9583430c73885 (patch)
treeac953adcc44c6488335d003877f3cb0999506565 /recipes-devtools/clang/compiler-rt_git.bb
parent1ce5b0090e18f1cf717e90b403ee875b7e16060e (diff)
downloadmeta-clang-cda1376a97b86d6ae5c92fd931f9583430c73885.tar.gz
clang: use nonarch_libdir/clang for all runtime files
This allows the cross compiler to always find the runtime libraries in the same place, no matter the value of libdir. This is required for multilib to work correctly. Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
Diffstat (limited to 'recipes-devtools/clang/compiler-rt_git.bb')
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb26
1 files changed, 16 insertions, 10 deletions
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index 37ae096..09b82cd 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -51,6 +51,12 @@ do_compile() {
51 51
52do_install() { 52do_install() {
53 DESTDIR=${D} ninja ${PARALLEL_MAKE} install-compiler-rt 53 DESTDIR=${D} ninja ${PARALLEL_MAKE} install-compiler-rt
54
55 if [ -n "${LLVM_LIBDIR_SUFFIX}" ]; then
56 mkdir -p ${D}${nonarch_libdir}
57 mv ${D}${libdir}/clang ${D}${nonarch_libdir}/clang
58 rmdir --ignore-fail-on-non-empty ${D}${libdir}
59 fi
54} 60}
55 61
56 62
@@ -71,19 +77,18 @@ do_install_append () {
71 rm -rf ${D}${exec_prefix}/lib/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o 77 rm -rf ${D}${exec_prefix}/lib/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o
72} 78}
73 79
74sysroot_stage_all_append_class-target() {
75 sysroot_stage_dir ${D}${exec_prefix}/lib ${SYSROOT_DESTDIR}${exec_prefix}/lib
76}
77
78FILES_SOLIBSDEV = "" 80FILES_SOLIBSDEV = ""
79FILES_${PN} += "${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ 81FILES_${PN} += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \
80 ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \ 82 ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/*.txt \
81 ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt" 83 ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/share/*.txt"
82FILES_${PN}-staticdev += "${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" 84FILES_${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a"
83FILES_${PN}-dev += "${datadir} ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ 85FILES_${PN}-dev += "${datadir} ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \
84 ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \ 86 ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/include \
87 ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/clang_rt.crt*.o \
88 ${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.asan-preinit*.a \
85 " 89 "
86INSANE_SKIP_${PN} = "dev-so libdir" 90INSANE_SKIP_${PN} = "dev-so libdir"
91INSANE_SKIP_${PN}-dbg = "libdir"
87 92
88#PROVIDES_append_class-target = "\ 93#PROVIDES_append_class-target = "\
89# virtual/${TARGET_PREFIX}compilerlibs \ 94# virtual/${TARGET_PREFIX}compilerlibs \
@@ -102,3 +107,4 @@ ALLOW_EMPTY_${PN} = "1"
102ALLOW_EMPTY_${PN}-dev = "1" 107ALLOW_EMPTY_${PN}-dev = "1"
103 108
104TOOLCHAIN_forcevariable = "clang" 109TOOLCHAIN_forcevariable = "clang"
110SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}"