All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark.yang@lge.com
To: openembedded-core@lists.openembedded.org
Cc: "mark.yang" <mark.yang@lge.com>
Subject: [OE-core][PATCH 1/3] module.bbclass/make-mod-scripts: inhibit default dependencies
Date: Wed,  8 Jul 2026 11:28:54 +0900	[thread overview]
Message-ID: <20260708022856.2087339-2-mark.yang@lge.com> (raw)
In-Reply-To: <20260708022856.2087339-1-mark.yang@lge.com>

From: "mark.yang" <mark.yang@lge.com>

Modules and make-mod-scripts build against the shared kernel build tree
with the kernel toolchain, so the default virtual/libc and
virtual/compilerlibs dependencies are unused. Inhibit them and add the
cross toolchain explicitly like kernel.bbclass does.

This also avoids dragging compiler-rt and libcxx into every module
build when TOOLCHAIN is set to clang.

Signed-off-by: mark.yang <mark.yang@lge.com>
---
 meta/classes-recipe/module.bbclass                           | 5 +++++
 meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/meta/classes-recipe/module.bbclass b/meta/classes-recipe/module.bbclass
index 6b2c09f441..a65744d33e 100644
--- a/meta/classes-recipe/module.bbclass
+++ b/meta/classes-recipe/module.bbclass
@@ -6,6 +6,11 @@
 
 inherit module-base kernel-module-split pkgconfig
 
+# Modules build with the kernel toolchain against the shared kernel build tree
+# and do not need the default userspace toolchain/libc dependencies.
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "virtual/cross-cc virtual/cross-binutils"
+
 EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
 
 MODULES_INSTALL_TARGET ?= "modules_install"
diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
index 4b0630313f..97521c89e9 100644
--- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
+++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb
@@ -18,6 +18,11 @@ DEV_PKG_DEPENDENCY = ""
 DEPENDS += "bc-native bison-native"
 DEPENDS += "gmp-native"
 
+# The scripts build uses the kernel toolchain against the shared kernel build
+# tree and does not need the default userspace toolchain/libc dependencies.
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "virtual/cross-cc virtual/cross-binutils"
+
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
 EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROSS_COMPILE=${TARGET_PREFIX}"
 


  reply	other threads:[~2026-07-08  2:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08  2:28 [OE-core][PATCH 0/3] kernel: make the kernel toolchain switchable to clang mark.yang
2026-07-08  2:28 ` mark.yang [this message]
2026-07-08  2:28 ` [OE-core][PATCH 2/3] kernel-yocto: export CLANG_FLAGS for the kconfiglib config audit mark.yang
2026-07-08  2:28 ` [OE-core][PATCH 3/3] kernel-arch: add KERNEL_TOOLCHAIN for building the kernel with clang mark.yang
2026-07-08  2:37 ` [OE-core][PATCH 0/3] kernel: make the kernel toolchain switchable to clang Bruce Ashfield
2026-07-08  2:44   ` [PATCH " 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=20260708022856.2087339-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.