Skip to content

Commit 96f1240

Browse files
dwmw2bonzini
authored andcommitted
KVM: selftests: add -MP to CFLAGS
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 <dwmw@amazon.co.uk> Link: https://lore.kernel.org/r/9fc8b5395321abbfcaf5d78477a9a7cd350b08e4.camel@infradead.org Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 4a073e8 commit 96f1240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/kvm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ else
224224
LINUX_TOOL_ARCH_INCLUDE = $(top_srcdir)/tools/arch/$(ARCH)/include
225225
endif
226226
CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \
227-
-Wno-gnu-variable-sized-type-not-at-end -MD\
227+
-Wno-gnu-variable-sized-type-not-at-end -MD -MP \
228228
-fno-builtin-memcmp -fno-builtin-memcpy -fno-builtin-memset \
229229
-fno-builtin-strnlen \
230230
-fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \

0 commit comments

Comments
 (0)