Commit db0d6263 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: remove dependency on compile.h

We had a dummy dependency on include/linux/compile.h, but it really caused
more trouble than benefits. It's not actually needed for the module
postprocessing, it was only put there to make sure we recognize when
gcc changed under us. However, we really can only do so much, and
the rest of kbuild won't notice a changed gcc either, so if the user replaces
gcc during a build, he just can't rely on the build doing the right thing.

The common cases are still covered, anyway. When the command to invoke
gcc changes ("CC=gcc32") we notice, and when the path to

	/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h

changes (which luckily contains the "2.96", we'll notice and handle that,
too.
parent 41f57979
...@@ -501,11 +501,8 @@ all: modules ...@@ -501,11 +501,8 @@ all: modules
# Build modules # Build modules
include/linux/compile.h: FORCE
$(Q)$(MAKE) $(build)=init include/linux/compile.h
.PHONY: modules .PHONY: modules
modules: $(SUBDIRS) $(if $(KBUILD_BUILTIN),vmlinux) include/linux/compile.h modules: $(SUBDIRS) $(if $(KBUILD_BUILTIN),vmlinux)
@echo ' Building modules, stage 2.'; @echo ' Building modules, stage 2.';
$(Q)$(MAKE) -rR -f scripts/Makefile.modpost $(Q)$(MAKE) -rR -f scripts/Makefile.modpost
......
...@@ -37,10 +37,7 @@ targets += $(modules) ...@@ -37,10 +37,7 @@ targets += $(modules)
quiet_cmd_cc_o_c = CC $@ quiet_cmd_cc_o_c = CC $@
cmd_cc_o_c = $(CC) $(CFLAGS) $(CFLAGS_MODULE) -c -o $@ $< cmd_cc_o_c = $(CC) $(CFLAGS) $(CFLAGS_MODULE) -c -o $@ $<
# We have a fake dependency on compile.h to make sure that we $(modules:.ko=.mod.o): %.mod.o: %.mod.c
# notice if the compiler version changes under us.
$(modules:.ko=.mod.o): %.mod.o: %.mod.c include/linux/compile.h FORCE
$(call if_changed,cc_o_c) $(call if_changed,cc_o_c)
targets += $(modules:.ko=.mod.o) targets += $(modules:.ko=.mod.o)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment