diff mbox series

kernel-devsrc: normalize Clang compiler entry in auto.conf.cmd

Message ID 20260826083711.3771175-1-Harish.Sadineni@windriver.com
State New
Headers show
Series kernel-devsrc: normalize Clang compiler entry in auto.conf.cmd | expand

Commit Message

Harish Sadineni Aug. 26, 2026, 8:37 a.m. UTC
From: Harish Sadineni <Harish.Sadineni@windriver.com>

fixes:
/lib/modules/6.18.35-yocto-standard/build/include/config/auto.conf.cmd in
package kernel-devsrc contains reference to TMPDIR [buildpaths]

Normalize the recorded Clang compiler invocation in
include/config/auto.conf.cmd in the same way as the existing GCC
handling.

When the kernel is built with Clang, Kbuild records the full compiler
command, including Yocto-specific path mapping options, in
auto.conf.cmd. This causes absolute build paths to be packaged in
kernel-devsrc, triggering the buildpaths QA check.

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 2d80278830..a38e4fed44 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -420,6 +420,7 @@  do_install() {
 
     if [ -e "$kerneldir/build/include/config/auto.conf.cmd" ]; then
         sed -i 's/ifneq "$(CC)" ".*-linux-.*gcc.*$/ifneq "$(CC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
+        sed -i 's/ifneq "$(CC)" ".*clang.*$/ifneq "$(CC)" "clang"/' "$kerneldir/build/include/config/auto.conf.cmd"
         sed -i 's/ifneq "$(LD)" ".*-linux-.*ld.bfd.*$/ifneq "$(LD)" "ld"/' "$kerneldir/build/include/config/auto.conf.cmd"
         sed -i 's/ifneq "$(AR)" ".*-linux-.*ar.*$/ifneq "$(AR)" "ar"/' "$kerneldir/build/include/config/auto.conf.cmd"
         sed -i 's/ifneq "$(OBJCOPY)" ".*-linux-.*objcopy.*$/ifneq "$(OBJCOPY)" "objcopy"/' "$kerneldir/build/include/config/auto.conf.cmd"