Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: x86: Fix incorrect kernel headers search path

Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org> # 5.18+
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Mathieu Desnoyers and committed by
Shuah Khan
ac5ec90e 8eb3751c

+1 -1
+1 -1
tools/testing/selftests/x86/Makefile
··· 34 34 BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32)) 35 35 BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64)) 36 36 37 - CFLAGS := -O2 -g -std=gnu99 -pthread -Wall 37 + CFLAGS := -O2 -g -std=gnu99 -pthread -Wall $(KHDR_INCLUDES) 38 38 39 39 # call32_from_64 in thunks.S uses absolute addresses. 40 40 ifeq ($(CAN_BUILD_WITH_NOPIE),1)