Re: No forces rebuild while changing GCC?
From: Sam Ravnborg
Date: Thu May 20 2004 - 13:46:12 EST
On Thu, May 20, 2004 at 08:16:17PM +0200, Jan-Benedict Glaw wrote:
> I'm currently playing with patches for gcc HEAD to build a vax-linux
> cross-compiler. For testing it, I first want to build parts of the
> kernel with my HEAD toolchain, Ctrl-C, and continue/finish building with
> my old compiler (2.95.2).
> I do changing gcc by putting one or the other gcc into $PATH. However,
> whenever I change GCC, kbuild decides to rebuild everything.
> I tried to not overwrite compile.h (my commenting out the mv command in
> scripts/mkcompile_h), but that didn't help either. I even tried
> recompiling my HEAD gcc with exactly the same version string that my old
> gcc had, but that didn't work either:(
> How can I force to keep my old .o files?
This is not easy. kbuild uses a number of measures to check dependencies:
1) Changes in commandline, including name of binary
- Order is not relevant, only content
2) Compiler version used for version.h
- To avoid this remove the FORCE in init/Makefile
3) Usual dependencies, including stdarg.h which is part of the compiler
4) Change in configuration relevant for that specific file
I think you are hit by 1) in your case.
Do you use same name for both gcc versions?
Otherwise it will fail as you describe (actually work as expected).
Try to compare to commandlines when using "make V=1", to check what gcc
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/