From 6531a7e075feae986ea3e204d926a508ffa51f55 Mon Sep 17 00:00:00 2001 From: Joe Lawrence Date: Mon, 20 Jul 2020 13:15:22 -0400 Subject: [PATCH] kpatch-build: avoid modpost .output.o.cmd complaints The modpost step complains about one of our generated files, output.o and that it can't find a corresponding .cmd file for it (full path names stripped): WARNING: could not find .output.o.cmd for output.o This was turned into an error in v5.8: .output.o.cmd: No such file or directory Avoid this by creating an empty .cmd file so that modpost acknowledges that the file exists, but doesn't parse anything out of it. Fixes #1125 Reported-by: Kamalesh Babulal (for v5.8+) Signed-off-by: Joe Lawrence --- kpatch-build/kpatch-build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index ab09515..e521c0e 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -963,6 +963,8 @@ ld -r $KPATCH_LDFLAGS -o ../patch/tmp_output.o $(find . -name "*.o") 2>&1 | logg if [[ "$USE_KLP" -eq 1 ]]; then cp "$TEMPDIR"/patch/tmp_output.o "$TEMPDIR"/patch/output.o || die + # Avoid MODPOST warning (pre-v5.8) and error (v5.8+) with an empty .cmd file + touch "$TEMPDIR"/patch/.output.o.cmd || die else # Add .kpatch.checksum for kpatch script md5sum ../patch/tmp_output.o | awk '{printf "%s\0", $1}' > checksum.tmp || die