Make the gzip command generic and use -9 which wasn't use for config.gz. (xen.gz does use -9)
Signed-off-by: Anthony PERARD <anthony.per...@citrix.com> --- xen/Rules.mk | 5 +++++ xen/common/Makefile | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 59072ae8df..68b10ca5ef 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -63,6 +63,11 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ quiet_cmd_binfile = BINFILE $@ cmd_binfile = $(SHELL) $(srctree)/tools/binfile $(BINFILE_FLAGS) $@ $(2) +# gzip +quiet_cmd_gzip = GZIP $@ +cmd_gzip = \ + cat $(real-prereqs) | gzip -n -f -9 > $@ + # Figure out what we need to build from the various variables # =========================================================================== diff --git a/xen/common/Makefile b/xen/common/Makefile index 46049eac35..f45f19c391 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -78,13 +78,13 @@ obj-$(CONFIG_NEEDS_LIBELF) += libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/ CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(objtree)/)$(KCONFIG_CONFIG) -$(obj)/config.gz: $(CONF_FILE) - gzip -n -c $< >$@ +$(obj)/config.gz: $(CONF_FILE) FORCE + $(call if_changed,gzip) + +targets += config.gz $(obj)/config_data.o: $(obj)/config.gz $(obj)/config_data.S: $(srctree)/tools/binfile FORCE $(call if_changed,binfile,$(obj)/config.gz xen_config_data) targets += config_data.S - -clean-files := config.gz -- Anthony PERARD