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: 13439521 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D574AE56B for ; Sat, 28 Oct 2023 19:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mJA2za1s" 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 Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html 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) \