[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv2 RFC] makefile: detect corrupted elf files
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCHv2 RFC] makefile: detect corrupted elf files |
Date: |
Wed, 22 May 2013 01:07:09 +0300 |
Once in a while make gets killed and doesn't
clean up partial object files after it.
Result is nasty errors from link.
This hack checks object is well formed before linking,
and rebuilds it if not.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
v1 actually prints some noise on stderr, this shuts it up.
Makefile.target | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Makefile.target b/Makefile.target
index ce4391f..c506d4c 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -191,3 +191,10 @@ endif
GENERATED_HEADERS += config-target.h
Makefile: $(GENERATED_HEADERS)
+
+.SECONDEXPANSION:
+
+.PHONY: CORRUPTBINARY
+
+$(all-obj-y): % : $$(if $$(shell size % 2>/dev/null), , CORRUPTBINARY)
+
--
MST
- [Qemu-devel] [PATCHv2 RFC] makefile: detect corrupted elf files,
Michael S. Tsirkin <=