package/linux-tools: selftests: Use KHDR_INCLUDES to locate the headers
PATCH v2 1/1 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"")
--- package/linux-tools/linux-tool-selftests.mk.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/linux-tools/linux-tool-selftests.mk.in +2 -1
@@ -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/
Signature · 6 lines
2.55.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 8 lines · Maxime Chevallier via buildroot
Since v6.7 [1], the
KHDR_DIRvariable isn't used anymore by the kernel selftest Makefiles to locate the kernel headers. Instead,KHDR_INCLUDESis used to specify their location. It was only available between v6.5 and v6.7.Keep
KHDR_DIRfor compatibility with v6.5 to v6.7 kernels, whileKHDR_INCLUDESis used by both pre 6.5 and post 6.7 kernels.
Quoted 6 lines
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 <[email protected]>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Raphaël Mélotte via buildroot
AppliedIn reply of:
Quoted 8 lines
Since v6.7 [1], the
KHDR_DIRvariable isn't used anymore by the kernel selftest Makefiles to locate the kernel headers. Instead,KHDR_INCLUDESis used to specify their location. It was only available between v6.5 and v6.7.Keep
KHDR_DIRfor compatibility with v6.5 to v6.7 kernels, whileKHDR_INCLUDESis used by both pre 6.5 and post 6.7 kernels.
Quoted 6 lines
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 <[email protected]>
Applied to 2025.02.x, 2026.08.x. Thanks
Quoted 9 lines
--- package/linux-tools/linux-tool-selftests.mk.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)package/linux-tools/linux-tool-selftests.mk.in +0
-0
package/linux-tools/linux-tool-selftests.mk.in SELFTESTS_DEPENDENCIES = \ · line 31
Quoted 9 lines
package/linux-tools/linux-tool-selftests.mk.in +2
-1@@ -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/
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot