diff options
author | Khem Raj <raj.khem@gmail.com> | 2025-05-08 12:13:18 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-12 22:01:56 +0100 |
commit | 4f94b4b45d3c9fac8458e583a457d81795e38420 (patch) | |
tree | 49c6ba4e8892f37611f48adea120a2719dbe4ad9 | |
parent | 1cae6faf9d8f62a88e331503cec808fc6535fdcb (diff) | |
download | poky-4f94b4b45d3c9fac8458e583a457d81795e38420.tar.gz |
compiler-rt: Rename the rt libraries if compiled with arm hardfloat ABI
OE does not rely on tuple to deduce hardfloat ABI, but clang/llvm does
arm-yoe-linux-gnueabi is used for both soft and softfp and hardfp float
ABIs in OE, LLVM expects arm-yoe-linux-gnueabihf for it to be treated as
hardfloat ABI, and look for correct name for rt libraries.
We know when we compile them with Hard-float ABI so rename them in such
case so clang can find it when using -rtlib=compiler-rt it needs to
has 'armhf' suffix
(From OE-Core rev: b369e99cb27bd327ab244335b637f0ad3393d9b8)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/clang/compiler-rt_git.bb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb index 22dec88329..0a0ef6be80 100644 --- a/meta/recipes-devtools/clang/compiler-rt_git.bb +++ b/meta/recipes-devtools/clang/compiler-rt_git.bb | |||
@@ -50,7 +50,6 @@ PACKAGECONFIG[ctx-profile] = "-DCOMPILER_RT_BUILD_CTX_PROFILE=ON,-DCOMPILER_RT_B | |||
50 | 50 | ||
51 | HF = "" | 51 | HF = "" |
52 | HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" | 52 | HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" |
53 | HF[vardepvalue] = "${HF}" | ||
54 | 53 | ||
55 | CC = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" | 54 | CC = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" |
56 | CXX = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" | 55 | CXX = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" |
@@ -97,6 +96,12 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ | |||
97 | do_install:append () { | 96 | do_install:append () { |
98 | mkdir -p ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib | 97 | mkdir -p ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib |
99 | mv ${D}${nonarch_libdir}/linux ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib | 98 | mv ${D}${nonarch_libdir}/linux ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib |
99 | if [ "${HF}" = "hf" ]; then | ||
100 | mv -f ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.builtins-arm.a \ | ||
101 | ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.builtins-armhf.a | ||
102 | mv -f ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/liborc_rt-arm.a \ | ||
103 | ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/liborc_rt-armhf.a | ||
104 | fi | ||
100 | } | 105 | } |
101 | 106 | ||
102 | FILES_SOLIBSDEV = "" | 107 | FILES_SOLIBSDEV = "" |