From: Khem Raj Date: Thu, 8 May 2025 19:13:18 +0000 (-0700) Subject: compiler-rt: Rename the rt libraries if compiled with arm hardfloat ABI X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b369e99cb27bd327ab244335b637f0ad3393d9b8;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb index 22dec883298..0a0ef6be807 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 HF = "" HF:class-target = "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" -HF[vardepvalue] = "${HF}" CC = "${CCACHE}${HOST_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" CXX = "${CCACHE}${HOST_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" @@ -97,6 +96,12 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ do_install:append () { mkdir -p ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib mv ${D}${nonarch_libdir}/linux ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib + if [ "${HF}" = "hf" ]; then + mv -f ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.builtins-arm.a \ + ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/libclang_rt.builtins-armhf.a + mv -f ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/liborc_rt-arm.a \ + ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib/linux/liborc_rt-armhf.a + fi } FILES_SOLIBSDEV = ""