]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
selftests/powerpc: Fix incorrect kernel headers search path
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 27 Jan 2023 13:57:42 +0000 (08:57 -0500)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:47:28 +0000 (16:47 +0100)
BugLink: https://bugs.launchpad.net/bugs/2011425
commit 4f11410bf6da87defe8fd59b0413f0d9f71744da 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=...).

Cc: stable@vger.kernel.org # v5.18+
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230127135755.79929-22-mathieu.desnoyers@efficios.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
tools/testing/selftests/powerpc/ptrace/Makefile
tools/testing/selftests/powerpc/security/Makefile
tools/testing/selftests/powerpc/syscalls/Makefile
tools/testing/selftests/powerpc/tm/Makefile

index 2e68d79cbee72fcb0d587d6ef50bc03ce333752e..3f490916f11b816baf58ff39b67b03e46b880f6d 100644 (file)
@@ -33,7 +33,7 @@ TESTS_64 := $(patsubst %,$(OUTPUT)/%,$(TESTS_64))
 $(TESTS_64): CFLAGS += -m64
 $(TM_TESTS): CFLAGS += -I../tm -mhtm
 
-CFLAGS += -I../../../../../usr/include -fno-pie -Wno-error=deprecated
+CFLAGS += $(KHDR_INCLUDES) -fno-pie -Wno-error=deprecated
 
 $(OUTPUT)/ptrace-gpr: ptrace-gpr.S
 $(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
index 7488315fd8474434d8bcca38b00f28255f4a96df..e0d979ab0204026aed63ffbb8375088852b8520d 100644 (file)
@@ -5,7 +5,7 @@ TEST_PROGS := mitigation-patching.sh
 
 top_srcdir = ../../../../..
 
-CFLAGS += -I../../../../../usr/include
+CFLAGS += $(KHDR_INCLUDES)
 
 include ../../lib.mk
 
index b63f8459c704e7c79901557179faa1644c0c2c6d..d1f2648b112b64829da1b775402cb820827b190e 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 TEST_GEN_PROGS := ipc_unmuxed rtas_filter
 
-CFLAGS += -I../../../../../usr/include
+CFLAGS += $(KHDR_INCLUDES)
 
 top_srcdir = ../../../../..
 include ../../lib.mk
index 5881e97c73c1358e1b5e59bef38a3e5ca59214b2..3876805c2f312170d2a1c4bc9c855d83064d8383 100644 (file)
@@ -17,7 +17,7 @@ $(TEST_GEN_PROGS): ../harness.c ../utils.c
 CFLAGS += -mhtm
 
 $(OUTPUT)/tm-syscall: tm-syscall-asm.S
-$(OUTPUT)/tm-syscall: CFLAGS += -I../../../../../usr/include
+$(OUTPUT)/tm-syscall: CFLAGS += $(KHDR_INCLUDES)
 $(OUTPUT)/tm-tmspr: CFLAGS += -pthread
 $(OUTPUT)/tm-vmx-unavail: CFLAGS += -pthread -m64
 $(OUTPUT)/tm-resched-dscr: ../pmu/lib.c