[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190805124956.954506004@linuxfoundation.org>
Date: Mon, 5 Aug 2019 15:02:44 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Masahiro Yamada <yamada.masahiro@...ionext.com>
Subject: [PATCH 5.2 077/131] kbuild: modpost: include .*.cmd files only when targets exist
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
commit 944cfe9be1fbbec73bab2f7e77fe2e8f9c72970f upstream.
If a build rule fails, the .DELETE_ON_ERROR special target removes the
target, but does nothing for the .*.cmd file, which might be corrupted.
So, .*.cmd files should be included only when the corresponding targets
exist.
Commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd
files") missed to fix up this file.
Fixes: 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd")
Cc: <stable@...r.kernel.org> # v5.0+
Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
scripts/Makefile.modpost | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -142,10 +142,8 @@ FORCE:
# optimization, we don't need to read them if the target does not
# exist, we will rebuild anyway in that case.
-cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
+existing-targets := $(wildcard $(sort $(targets)))
-ifneq ($(cmd_files),)
- include $(cmd_files)
-endif
+-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
.PHONY: $(PHONY)
Powered by blists - more mailing lists