diff options
author | Daniel McGregor <daniel.mcgregor@vecima.com> | 2019-01-22 18:55:44 -0600 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-01-20 08:56:16 -0800 |
commit | cda1376a97b86d6ae5c92fd931f9583430c73885 (patch) | |
tree | ac953adcc44c6488335d003877f3cb0999506565 /recipes-devtools/clang/compiler-rt_git.bb | |
parent | 1ce5b0090e18f1cf717e90b403ee875b7e16060e (diff) | |
download | meta-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.bb | 26 |
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 | ||
52 | do_install() { | 52 | do_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 | ||
74 | sysroot_stage_all_append_class-target() { | ||
75 | sysroot_stage_dir ${D}${exec_prefix}/lib ${SYSROOT_DESTDIR}${exec_prefix}/lib | ||
76 | } | ||
77 | |||
78 | FILES_SOLIBSDEV = "" | 80 | FILES_SOLIBSDEV = "" |
79 | FILES_${PN} += "${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/lib*${SOLIBSDEV} \ | 81 | FILES_${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" |
82 | FILES_${PN}-staticdev += "${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" | 84 | FILES_${PN}-staticdev += "${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.a" |
83 | FILES_${PN}-dev += "${datadir} ${exec_prefix}/lib${LLVM_LIBDIR_SUFFIX}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/*.syms \ | 85 | FILES_${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 | " |
86 | INSANE_SKIP_${PN} = "dev-so libdir" | 90 | INSANE_SKIP_${PN} = "dev-so libdir" |
91 | INSANE_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" | |||
102 | ALLOW_EMPTY_${PN}-dev = "1" | 107 | ALLOW_EMPTY_${PN}-dev = "1" |
103 | 108 | ||
104 | TOOLCHAIN_forcevariable = "clang" | 109 | TOOLCHAIN_forcevariable = "clang" |
110 | SYSROOT_DIRS_append_class-target = " ${nonarch_libdir}" | ||