Linux kbuild/kconfig development
 help / color / mirror / Atom feed
* [PATCH] kbuild: m68k: Use target specific temporary files
@ 2026-12-04 15:59 Nicolas Schier
  2026-12-05 12:30 ` Thomas Weißschuh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nicolas Schier @ 2026-12-04 15:59 UTC (permalink / raw)
  To: Geert Uytterhoeven, Greg Ungerer, Sam Ravnborg
  Cc: Nathan Chancellor, linux-m68k, linux-kbuild, linux-kernel,
	Uwe Kleine-König, Nicolas Schier

Use target specific temporary files in possibly concurrently run
targets vmlinux.gz and vmlinux.bz2 to prevent mangling and build
breakage.

A later beautification may provide a central cmd_strip macro in
scripts/Makefile.lib and use that combined with cmd_gzip or cmd_bzip2
here.

Fixes: 281eff5322fd ("m68k: merge mmu and non-mmu arch Makefiles")
Reported-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Closes: https://lore.kernel.org/r/axLT1tUkIwtwx4W7@monoceros
Signed-off-by: Nicolas Schier <n.schier@fritz.com>
---
 arch/m68k/Makefile | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index 0abcf994ce55..0a8d99d62319 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -103,12 +103,12 @@ zImage compressed: vmlinux.gz
 vmlinux.gz: vmlinux
 
 ifndef CONFIG_KGDB
-	cp vmlinux vmlinux.tmp
-	$(STRIP) vmlinux.tmp
-	$(KGZIP) -9c vmlinux.tmp >vmlinux.gz
-	rm vmlinux.tmp
+	cp $< $(tmp-target).tmp
+	$(STRIP) $(tmp-target).tmp
+	$(KGZIP) -9c $(tmp-target).tmp >$@
+	rm $(tmp-target).tmp
 else
-	$(KGZIP) -9c vmlinux >vmlinux.gz
+	$(KGZIP) -9c $< >$@
 endif
 
 bzImage: vmlinux.bz2
@@ -116,12 +116,12 @@ bzImage: vmlinux.bz2
 vmlinux.bz2: vmlinux
 
 ifndef CONFIG_KGDB
-	cp vmlinux vmlinux.tmp
-	$(STRIP) vmlinux.tmp
-	$(KBZIP2) -1c vmlinux.tmp >vmlinux.bz2
-	rm vmlinux.tmp
+	cp $< $(tmp-target).tmp
+	$(STRIP) $(tmp-target).tmp
+	$(KBZIP2) -1c $(tmp-target).tmp >$@
+	rm $(tmp-target).tmp
 else
-	$(KBZIP2) -1c vmlinux >vmlinux.bz2
+	$(KBZIP2) -1c $< >$@
 endif
 
 CLEAN_FILES += vmlinux.gz vmlinux.bz2

---
base-commit: 3591da247d764905231f3a0b27bc093378508182
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-next-unstable
change-id: 20261204-kbuild-m68k-use-target-specific-temp-files-7edca4a0b47c

Best regards,
--  
Nicolas


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-05 16:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 15:59 [PATCH] kbuild: m68k: Use target specific temporary files Nicolas Schier
2026-12-05 12:30 ` Thomas Weißschuh
2026-12-05 14:36 ` Uwe Kleine-König
2026-12-05 16:00 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox