From patchwork Tue Mar 17 14:34:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 11443065 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DEC6159A for ; Tue, 17 Mar 2020 14:36:14 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68DFE206EC for ; Tue, 17 Mar 2020 14:36:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="oIJ1V+fk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 68DFE206EC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jEDId-0005uH-Rq; Tue, 17 Mar 2020 14:34:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jEDIc-0005uC-Dg for xen-devel@lists.xenproject.org; Tue, 17 Mar 2020 14:34:30 +0000 X-Inumbo-ID: 648e51a6-685c-11ea-92cf-bc764e2007e4 Received: from merlin.infradead.org (unknown [2001:8b0:10b:1231::1]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 648e51a6-685c-11ea-92cf-bc764e2007e4; Tue, 17 Mar 2020 14:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=8HWGOiSt+0RF+rxFe6qSyQHb6+n9xb+aV9aMwMPxrz8=; b=oIJ1V+fkvMuM/puv2waknGGn3v TrVTGEWeO3uynKVDvwrHv93gYMNTHk1iSWtKPGNiIxNAc90C2OnELOeoGMMfJceXxfG+Ft8cGnvro SRVXslKtYfYUSeFQbPXJSKzxzpoF0fzL9rvcqmB7L9thijK2UdoWLL1RXRZY9RXoPQTifhbxHwJin bOVjZk344wJywVQnugdHoP4k4u1Vs0o6ZMHbHC5wQPjvDoRnBnlHlOFKW3jMbRdvbtJkZ+gVvSdgs Q/iTpPiA6//22zigdKdjex2XXHXjsLvPlE4uGzRaAapdhxOyT7tzzDy7cHsJm18GzGg9A3Cja8tLs d3F8a5Sw==; Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=u3832b3a9db3152.ant.amazon.com) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEDIR-00008V-FB; Tue, 17 Mar 2020 14:34:19 +0000 Message-ID: <5fa9d44f9e396a07b87ef9bd63094237b1efecc2.camel@infradead.org> From: David Woodhouse To: xen-devel Date: Tue, 17 Mar 2020 14:34:16 +0000 X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Subject: [Xen-devel] [PATCH] Add -MP to CFLAGS along with -MMD. X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich , Anthony PERARD Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: David Woodhouse This causes gcc (yes, and clang) to emit phony targets for each dependency. This means that when a header file is deleted, the C files which *used* to include it will no longer stop building with bogus out-of-date dependencies like this: make[5]: *** No rule to make target '/home/dwmw2/git/xen/xen/include/asm/hvm/svm/amd-iommu-proto.h', needed by 'p2m.o'. Stop. Signed-off-by: David Woodhouse Acked-by: Andrew Cooper --- tools/Rules.mk | 2 +- xen/Rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 52f47be3f8..9bac15c8d1 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -186,7 +186,7 @@ SHLIB_libxlutil = $(SHDEPS_libxlutil) -Wl,-rpath-link=$(XEN_XLUTIL) CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ # Get gcc to generate the dependencies for us. -CFLAGS += -MMD -MF .$(if $(filter-out .,$(@D)),$(subst /,@,$(@D))@)$(@F).d +CFLAGS += -MMD -MP -MF .$(if $(filter-out .,$(@D)),$(subst /,@,$(@D))@)$(@F).d DEPS = .*.d ifneq ($(FILE_OFFSET_BITS),) diff --git a/xen/Rules.mk b/xen/Rules.mk index 92a13ca601..9079df7978 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -71,7 +71,7 @@ AFLAGS += -D__ASSEMBLY__ ALL_OBJS := $(ALL_OBJS-y) # Get gcc to generate the dependencies for us. -CFLAGS-y += -MMD -MF $(@D)/.$(@F).d +CFLAGS-y += -MMD -MP -MF $(@D)/.$(@F).d CFLAGS += $(CFLAGS-y) # allow extra CFLAGS externally via EXTRA_CFLAGS_XEN_CORE