From patchwork Sat Oct 28 19:34:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 739017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD6BFC4332F for ; Sat, 28 Oct 2023 19:34:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbjJ1Te5 (ORCPT ); Sat, 28 Oct 2023 15:34:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjJ1Te5 (ORCPT ); Sat, 28 Oct 2023 15:34:57 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4094AE0; Sat, 28 Oct 2023 12:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Type:Date:Cc:To: From:Subject:Message-ID:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=7N34jl1pa+OxTzodlAu7sJ8jyhqEHxdp9K9Ez/UV4hM=; b=mJA2za1sKHtyil1jWYOPte8V0U 2xQ5VomMfPRzGlSsxZXI4E75IQEIDsPIt7UH8A03a+ehaP0JwPrPtXH6cIFoXlJKE7o+3qYgaRsiq vRxhXZoqkFeK9B2Dsr2ZKpqCBd1k6OKIrU+TkZqmWbwtUjJeI0qkjyh5AQWuQf601ft2EGx01KKxZ CZUVFdoaorIzSlsd+XOXdgK5yLd3F1wRPn41znaeOaM5eDji0WU3WbMlSb519jaoTXU3zIn3ZQ3iX Pv45RJ6h9bf7mJi57uXUP2aQaN9KmqlObV0uXh6iKUp5d2bc7zEIgMTcaEdqGISG+91/EzwgtL06m 7AoxQ3iA==; Received: from [2001:8b0:10b:5:b7dd:c749:f0d9:3970] (helo=u3832b3a9db3152.ant.amazon.com) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qwp5B-00BAdU-Gb; Sat, 28 Oct 2023 19:34:53 +0000 Message-ID: <9fc8b5395321abbfcaf5d78477a9a7cd350b08e4.camel@infradead.org> Subject: [PATCH] KVM: selftests: add -MP to CFLAGS From: David Woodhouse To: kvm@vger.kernel.org Cc: Paolo Bonzini , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 28 Oct 2023 20:34:53 +0100 User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: David Woodhouse 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 --- tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index a3bb36fb3cfc..20ea549da570 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -211,7 +211,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) \