From ae8fd7c99f57bbfc8d1247a458710e3051b2fab0 Mon Sep 17 00:00:00 2001 From: Jan Dorniak Date: Mon, 19 Dec 2022 05:27:18 +0100 Subject: Fix OpenMP builds with thin LTO enabled. When built with thin LTO enabled, LLVM produces object files containing LLVM IR, which ld can't understand. Since we're forcing the toolchain to clang anyway, let's also force using lld. Fixes GitHub #708 Signed-off-by: Jan Dorniak (cherry picked from commit bc8388c622c62cde24512d5b4473ede1f5710348) --- recipes-devtools/clang/openmp_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-devtools/clang/openmp_git.bb b/recipes-devtools/clang/openmp_git.bb index b1f1a8d..90b839c 100644 --- a/recipes-devtools/clang/openmp_git.bb +++ b/recipes-devtools/clang/openmp_git.bb @@ -12,6 +12,8 @@ TOOLCHAIN = "clang" LIC_FILES_CHKSUM = "file://openmp/LICENSE.TXT;md5=d75288d1ce0450b28b8d58a284c09c79" +LDFLAGS:append = " -fuse-ld=lld" + inherit cmake pkgconfig perlnative DEPENDS += "elfutils libffi clang" -- cgit v1.2.3-54-g00ecf