]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
kbuild: fix building vmlinux.o
authorSam Ravnborg <sam@ravnborg.org>
Wed, 13 Feb 2008 21:50:24 +0000 (22:50 +0100)
committerSam Ravnborg <sam@ravnborg.org>
Thu, 14 Feb 2008 22:33:25 +0000 (23:33 +0100)
Ingo Molnar wrote:
>
> i've got a build log from a weird build error below:
>
>   LD      init/built-in.o
> distcc[12023] ERROR: compile (null) on localhost failed
> make: *** [vmlinux.o] Error 1
> make: *** Waiting for unfinished jobs....
>   LD      .tmp_vmlinux1
>

Building vmlinux.o were moved up in the dependency chain so we started
to build it before the kallsym stuff. This was done to let modpost
report section mismatch bugs even when the final link failed.

Originally I had expected the dependency of $(kallsyms.o) to
cover this but it turns out that we need to be even more explicit.
Fix this by adding a conditional dependency on firat target
used in the kallsyms serie of builds.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Roland McGrath <roland@redhat.com>
Makefile

index d73865188372362facec7bc1372917332667a49f..0d585c09d60c208c6bcaf00aa1201d864c3be143 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -811,7 +811,9 @@ endif
        $(Q)rm -f .old_version
 
 # build vmlinux.o first to catch section mismatch errors early
-$(kallsyms.o): vmlinux.o
+ifdef CONFIG_KALLSYMS
+.tmp_vmlinux1: vmlinux.o
+endif
 vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE
        $(call if_changed_rule,vmlinux-modpost)