]> Git Repo - J-linux.git/commitdiff
KVM: selftests: add -MP to CFLAGS
authorDavid Woodhouse <[email protected]>
Sat, 28 Oct 2023 19:34:53 +0000 (20:34 +0100)
committerPaolo Bonzini <[email protected]>
Fri, 8 Dec 2023 18:18:50 +0000 (13:18 -0500)
Using -MD without -MP causes build failures when a header file is deleted
or moved. With -MP, the compiler will emit phony targets for the header
files it lists as dependencies, and the Makefiles won't refuse to attempt
to rebuild a C unit which no longer includes the deleted header.

Signed-off-by: David Woodhouse <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
tools/testing/selftests/kvm/Makefile

index 52c59bad721395f9ad6644dcc3b5b3d7aeb2f62c..963435959a92f054e291d82049366ac1bd346bf8 100644 (file)
@@ -224,7 +224,7 @@ else
 LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include
 endif
 CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \
-       -Wno-gnu-variable-sized-type-not-at-end -MD\
+       -Wno-gnu-variable-sized-type-not-at-end -MD -MP \
        -fno-builtin-memcmp -fno-builtin-memcpy -fno-builtin-memset \
        -fno-builtin-strnlen \
        -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \
This page took 0.046411 seconds and 4 git commands to generate.