Skip to content

Commit

Permalink
kbuild: fix building vmlinux.o
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Roland McGrath <[email protected]>
  • Loading branch information
sravnborg committed Feb 14, 2008
1 parent e06b8b9 commit cf87dcd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit cf87dcd

Please sign in to comment.