diff mbox series

[Bug,1882497] Re: Missing 'cmp' utility makes build take 10 times as long

Message ID 159160141097.32347.17667526010393254030.malone@gac.canonical.com
State New
Headers show
Series [Bug,1882497] Re: Missing 'cmp' utility makes build take 10 times as long | expand

Commit Message

Laurent Vivier June 8, 2020, 7:30 a.m. UTC
cmp is used in the makefiles.

And there is some kind of warning during build if it is missing:

/bin/sh: cmp: command not found

But perhaps it should abort the build in this case.

Something like that helps:
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 40e4f7677bde..05e029bd99db 100644
--- a/Makefile
+++ b/Makefile
@@ -482,6 +482,7 @@  include $(SRC_PATH)/tests/Makefile.include
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y)
 
 qemu-version.h: FORCE
+       @type cmp
        $(call quiet-command, \
                 (printf '#define QEMU_PKGVERSION "$(QEMU_PKGVERSION)"\n'; \
                printf '#define QEMU_FULL_VERSION "$(FULL_VERSION)"\n'; \