Re: rebuilding object files from asm files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andi.

On Wed, Feb 20, 2008 at 07:12:00PM +0100, Andi Kleen wrote:
> 
> Here's a small kbuild quirk I noticed on 2.6.25rc2. I tried to rebuild
> the obj file of a assembler file (.S) with make path/to/file.o.
> 
> Normally when I do this for .o file only its dependencies and 
> and the object file are built as I expect.
> 
> But with an assembler file (like arch/x86/kernel/head_64.o) kbuild
> starts to rebuild everything. 

Took a look at this.
You will notice that there is a difference in the behaviour
betweet arch/x86/kernel/entry_64.o and head_64.o from same dir.
For entry_64.o it works as expected.

The 'problem' is that kbuild when deciding to use the rule:
%.o: %.S prepare scripts FORCE
        $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)

Already have done most of the work and mainly is has defined
the dependencies for vmlinux.
As head_64.o is listed in $(head-y) kbuild do as
told in following rule:

Note: vmlinux-init is equal to $(head-y) + $(init-y)

# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;

So building head_64.o requires a visit of all directories listed
in vmlinux-dirs before it can build head_64.o.

I do not see any clean way to fix this :-(

	Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux