From: mark.yang@lge.com
To: openembedded-core@lists.openembedded.org
Cc: "mark.yang" <mark.yang@lge.com>
Subject: [PATCH v2] llvm: enable LLVMgold.so build by adding binutils dependency
Date: Thu, 15 Jan 2026 13:24:54 +0900 [thread overview]
Message-ID: <20260115042452.39219-1-mark.yang@lge.com> (raw)
From: "mark.yang" <mark.yang@lge.com>
Currently, LLVMgold.so is not built because the binutils headers
are missing during the build process.
This allows LLVM to find the necessary headers and build the LLVMgold.so,
which is required for Link Time Optimization (LTO) support properly.
Signed-off-by: mark.yang <mark.yang@lge.com>
---
changes in v2:
- Add llvm-linker-tools package to include LLVMgold.so and libLTO.so
---
meta/recipes-devtools/clang/llvm_git.bb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/clang/llvm_git.bb b/meta/recipes-devtools/clang/llvm_git.bb
index 96ea383731..108e884a6f 100644
--- a/meta/recipes-devtools/clang/llvm_git.bb
+++ b/meta/recipes-devtools/clang/llvm_git.bb
@@ -11,7 +11,7 @@ require common-source.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
-DEPENDS = "llvm-tblgen-native libffi libxml2 zlib zstd"
+DEPENDS = "llvm-tblgen-native libffi libxml2 zlib zstd binutils"
inherit cmake pkgconfig lib_package multilib_header
@@ -50,6 +50,7 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=MinSizeRel \
-DLLVM_TOOL_YAML2OBJ_BUILD=OFF \
-DLLVM_NATIVE_TOOL_DIR=${STAGING_BINDIR_NATIVE} \
-DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
+ -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR} \
-DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain-native.cmake' \
"
@@ -126,6 +127,10 @@ llvm_sysroot_preprocess() {
install -m 0755 ${S}/llvm/tools/llvm-config/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
}
+PACKAGES =+ "llvm-linker-tools"
+
+FILES:llvm-linker-tools = "${libdir}/LLVMgold* ${libdir}/libLTO.so.*"
+
FILES:${PN}-dev += "${libdir}/llvm-config"
BBCLASSEXTEND = "native nativesdk"
next reply other threads:[~2026-01-15 4:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-15 4:24 mark.yang [this message]
2026-01-19 18:12 ` [OE-core] [PATCH v2] llvm: enable LLVMgold.so build by adding binutils dependency Ross Burton
2026-01-19 22:23 ` mark.yang
2026-03-03 10:37 ` Varatharajan, Deepesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260115042452.39219-1-mark.yang@lge.com \
--to=mark.yang@lge.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox