From: mark.yang@lge.com
To: openembedded-core@lists.openembedded.org
Cc: "mark.yang" <mark.yang@lge.com>
Subject: [PATCH v3 1/3] kernel-arch: fall back to GNU ld unless ld-is-lld is in DISTRO_FEATURES
Date: Mon, 20 Jul 2026 18:31:17 +0900 [thread overview]
Message-ID: <20260720093119.3245892-2-mark.yang@lge.com> (raw)
In-Reply-To: <20260720093119.3245892-1-mark.yang@lge.com>
From: "mark.yang" <mark.yang@lge.com>
Nothing stages a bare ld.lld unless ld-is-lld is in DISTRO_FEATURES,
so a clang kernel fails its first linker check on any other setup.
Use GNU ld.bfd from binutils-cross instead.
Signed-off-by: mark.yang <mark.yang@lge.com>
---
v3: no changes
v2: new patch; the merged clang support uses a bare ld.lld which
nothing stages without ld-is-lld
meta/classes-recipe/kernel-arch.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes-recipe/kernel-arch.bbclass b/meta/classes-recipe/kernel-arch.bbclass
index 6ebc0f13ea..321c9ed577 100644
--- a/meta/classes-recipe/kernel-arch.bbclass
+++ b/meta/classes-recipe/kernel-arch.bbclass
@@ -88,7 +88,7 @@ KERNEL_CC:toolchain-clang = "${CCACHE}clang ${HOST_CC_KERNEL_ARCH} \
-ffile-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} \
-ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH} \
"
-KERNEL_LD:toolchain-clang = "ld.lld ${HOST_LD_KERNEL_ARCH}"
+KERNEL_LD:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', 'ld.lld', '${HOST_PREFIX}ld.bfd', d)} ${HOST_LD_KERNEL_ARCH}"
KERNEL_AR:toolchain-clang = "llvm-ar ${HOST_AR_KERNEL_ARCH}"
KERNEL_OBJCOPY:toolchain-clang = "llvm-objcopy ${HOST_OBJCOPY_KERNEL_ARCH}"
KERNEL_STRIP:toolchain-clang = "llvm-strip"
next prev parent reply other threads:[~2026-07-20 9:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 9:31 [PATCH v3 0/3] kernel: make the kernel toolchain switchable to clang mark.yang
2026-07-20 9:31 ` mark.yang [this message]
2026-07-20 9:31 ` [PATCH v3 2/3] module.bbclass/make-mod-scripts: inhibit default dependencies mark.yang
2026-07-20 9:31 ` [PATCH v3] kernel: add KERNEL_TOOLCHAIN to switch the whole kernel toolchain mark.yang
2026-07-20 23:17 ` [PATCH v3 3/3] " mark.yang
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=20260720093119.3245892-2-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