lkml.org 
[lkml]   [2006]   [May]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateFri, 5 May 2006 17:15:31 +0200
FromSam Ravnborg <>
SubjectRe: Kbuild + Cross compiling
On Fri, May 05, 2006 at 02:30:05AM -0400, Dan Merillat wrote:
> On 5/5/06, Sam Ravnborg <sam@ravnborg.org> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-05 15:17    [from the cache]
©2003-2008