Skip to content

Commit

Permalink
kbuild: fix interaction of CONFIG_IKCONFIG and KCONFIG_CONFIG
Browse files Browse the repository at this point in the history
If you try to build a kernel with KCONFIG_CONFIG set (to a value
not equal to .config) and that config sets CONFIG_IKCONFIG then the
build will fail with:

make[1]: *** No rule to make target `.config', needed by \
`kernel/config_data.gz'.  Stop.

because the kernel/Makefile contains a direct reference to .config.

This issue has been present since the introduction of KCONFIG_CONFIG
in 14cdd3c.

Signed-off-by: Ben Gardiner <[email protected]>
CC: Roman Zippel <[email protected]>
CC: Michal Marek <[email protected]>
Reviewed-by: Michal Marek <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
BenGardiner authored and michal42 committed Dec 14, 2010
1 parent ba9effa commit 41263fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ ifeq ($(ARCH),m68knommu)
endif

KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG

# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
Expand Down
2 changes: 1 addition & 1 deletion kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ $(obj)/configs.o: $(obj)/config_data.h
# config_data.h contains the same information as ikconfig.h but gzipped.
# Info from config_data can be extracted from /proc/config*
targets += config_data.gz
$(obj)/config_data.gz: .config FORCE
$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
$(call if_changed,gzip)

quiet_cmd_ikconfiggz = IKCFG $@
Expand Down

0 comments on commit 41263fc

Please sign in to comment.