diff mbox series

[meta-oe] spidev-test: clean the build dir before configure

Message ID 20260929150435.2951493-1-mehmet.fide@gmail.com
State Accepted
Headers show
Series [meta-oe] spidev-test: clean the build dir before configure | expand

Commit Message

Mehmet Fide Sept. 29, 2026, 3:04 p.m. UTC
From: Mehmet Fide <mehmet.fide@screeningeagle.com>

The recipe builds out of tree with O=${B}, and the kernel's tools/build
writes fixdep .cmd files into ${B} that list the compiler's own headers
by absolute path, version included. When the toolchain changes (gcc
13.4 -> 13.5 here) do_compile reruns in the same ${B}, make cannot find
the old prerequisite and stops:

  make[1]: *** No rule to make target '.../recipe-sysroot-native/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/13.4.0/include/stddef.h', needed by '.../spidev_test.o'.  Stop.

Empty ${B} before configure, as bpftool does.

Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
---
 meta-oe/recipes-kernel/spidev-test/spidev-test.bb | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-kernel/spidev-test/spidev-test.bb b/meta-oe/recipes-kernel/spidev-test/spidev-test.bb
index 7b87dd28df..4c59d861b9 100644
--- a/meta-oe/recipes-kernel/spidev-test/spidev-test.bb
+++ b/meta-oe/recipes-kernel/spidev-test/spidev-test.bb
@@ -11,6 +11,7 @@  do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
 EXTRA_OEMAKE = "-C ${S}/tools/spi O=${B} CROSS=${TARGET_PREFIX} CC="${CC}" LD="${LD}" AR=${AR} ARCH=${ARCH}"
 
 do_configure[depends] += "virtual/kernel:do_shared_workdir"
+do_configure[cleandirs] = "${B}"
 
 do_compile() {
     oe_runmake