Re: Kbuild + Cross compiling

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

 



On Fri, May 05, 2006 at 02:30:05AM -0400, Dan Merillat wrote:
> On 5/5/06, Sam Ravnborg <[email protected]> wrote:
> >kbuild checks for any differences in the commandline alos - so a rebuild
> >happens if you change options to gcc (think -O2 => -Os).
> >If you experience that for example mm/slab.c is rebuild then try to
> >do the following:
> >cp mm/.slab.o.cmd foo
> >make mm/
> >diff -u foo mm/.slab.o.cmd
> >
> >If diff detects any difference then you know why and need to find out
> >why there is a difference.
> 
> Nothing, even md5sums match.
> 2abfcbee132335ba8e1da120569abf67  .do_mounts.o.cmd
> 2abfcbee132335ba8e1da120569abf67  .do_mounts.o.cmd.1
> 
> but it gets rebuilt every time.

So we need to dive a bit deeper to understand why everything gets
rebuild.
Try following patch:

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index e48e60d..4c52131 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -189,6 +189,9 @@ endef
 # Built-in and composite module parts
 
 %.o: %.c FORCE
+	@echo $@
+	@echo chg=$?
+	@echo arg-check=$(call arg-check, $(cmd_cc_o_c), $(cmd_$@))
 	$(call cmd,force_checksrc)
 	$(call if_changed_rule,cc_o_c)
 
This will not fix anything - but will give us a hint why things gets
rebuild.
After applying the patch try:
make init/do_mounts.o

And then post the output.
Also include the .do_mounts.o.cmd file

	Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux