package/linux-tools: selftests: use KHDR_INCLUDES to locate the headers

Since v6.7 [1], the KHDR_DIR variable isn't used anymore by the kernel
selftest Makefiles to locate the kernel headers. Instead, KHDR_INCLUDES
is used to specify their location. It was only available between v6.5
and v6.7.

Keep KHDR_DIR for compatibility with v6.5 to v6.7 kernels, while
KHDR_INCLUDES is used by both pre 6.5 and post 6.7 kernels.

Let's pass it with the "-isystem" flag, as is done in the default values
used in the selftest makefiles.

[1]: 43e8832fed08 ("Revert "selftests: error out if kernel header files are not yet built"")

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Maxime Chevallier
2026-10-04 23:31:15 +02:00
committed by Thomas Petazzoni
parent 0594de6b1c
commit 716a715539

View File

@@ -24,7 +24,8 @@ SELFTESTS_DEPENDENCIES = \
SELFTESTS_MAKE_FLAGS = \
$(LINUX_MAKE_FLAGS) \
ARCH=$(SELFTESTS_ARCH) \
KHDR_DIR=$(LINUX_DIR)/usr/include
KHDR_DIR=$(LINUX_DIR)/usr/include \
KHDR_INCLUDES="-isystem $(LINUX_DIR)/usr/include"
LINUX_TOOLS_BIN_ARCH_EXCLUDE += \
/usr/lib/kselftests/tc-testing/