Commit e78e8f2d8318851d0911039999c903a6082bef2e

Authored by Peter Foley
Committed by Michal Marek
1 parent f210735fe2

kernel: prevent unnecessary rebuilding due to config_data.gz

When IKCONFIG is built-in make oldconfig will cause the kernel to be
relinked even if .config didn't change. This happens because of a
config_data.gz dependency on .config. This patch changes the if_changed
to a filechk so that config_data.h is only rebuilt when the contents
have actually changed.

Signed-off-by: Peter Foley <pefoley2@verizon.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff

... ... @@ -125,11 +125,10 @@
125 125 $(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
126 126 $(call if_changed,gzip)
127 127  
128   -quiet_cmd_ikconfiggz = IKCFG $@
129   - cmd_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;") > $@
  128 + filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;")
130 129 targets += config_data.h
131 130 $(obj)/config_data.h: $(obj)/config_data.gz FORCE
132   - $(call if_changed,ikconfiggz)
  131 + $(call filechk,ikconfiggz)
133 132  
134 133 $(obj)/time.o: $(obj)/timeconst.h
135 134