summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2023-01-27 08:57:45 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-10 09:34:15 +0100
commit3005b26951756ce8973b383aaba6099fcf54ebfd (patch)
treee6918d0ffaeaccf99d2541cad2d42e456a085bdf /tools
parentdb66ebfba23498d238ea669f724ce51f0110af75 (diff)
downloadlinux-stable-3005b26951756ce8973b383aaba6099fcf54ebfd.tar.gz
linux-stable-3005b26951756ce8973b383aaba6099fcf54ebfd.tar.bz2
linux-stable-3005b26951756ce8973b383aaba6099fcf54ebfd.zip
selftests: sched: Fix incorrect kernel headers search path
commit 0d2cace5af50806a6b32ab73d367b80e46acda0f upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/sched/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/sched/Makefile b/tools/testing/selftests/sched/Makefile
index 10c72f14fea9..099ee9213557 100644
--- a/tools/testing/selftests/sched/Makefile
+++ b/tools/testing/selftests/sched/Makefile
@@ -4,7 +4,7 @@ ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
CLANG_FLAGS += -no-integrated-as
endif
-CFLAGS += -O2 -Wall -g -I./ -I../../../../usr/include/ -Wl,-rpath=./ \
+CFLAGS += -O2 -Wall -g -I./ $(KHDR_INCLUDES) -Wl,-rpath=./ \
$(CLANG_FLAGS)
LDLIBS += -lpthread