No forces rebuild while changing GCC?
Hi!
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?
MfG, JBG
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Quoted 10 lines · Jan-Benedict Glaw
Hi!
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.
Quoted 6 lines
I tried to not overwrite
compile.h(my commenting out the mv command inscripts/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 include files
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 kbuild uses.
Sam
On Thu, 2004-05-20 20:56:35 +0200, Sam Ravnborg <[email protected]> wrote in message <[email protected]>:
Quoted 1 line · Jan-Benedict Glaw
[While changing gcc, ...]
Quoted 5 lines
Quoted 1 line
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
So I'll compare old gcc's command line with new gcc's.
Quoted 2 lines
2) Compiler version used for
version.h
- To avoid this remove the FORCE in init/Makefile
Done.
Quoted 2 lines
3) Usual dependencies, including
stdarg.hwhich is part of the compiler include files
Argh...
Quoted 1 line
4) Change in configuration relevant for that specific file
Argh, too:)
Quoted 2 lines
I think you are hit by 1) in your case.
Do you use same name for both gcc versions?
Both are just "vax-linux-gcc". I choose between them by altering $PATH before I call "make mopboot".
Quoted 1 line
Otherwise it will fail as you describe (actually work as expected).
Right... It works as expectes and tried hard to build a consistent kernel (actually, you did a great job at that!).
Quoted 2 lines
Try to compare to commandlines when using "make V=1", to check what gcc kbuild uses.
Will do. Ah.
"-Wdeclaration-after-statement" is added to command line iff gcc accepts it. The new one does, the old one didn't. Now commented out:) Works.
Thanks, JBG
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Quoted 2 lines · Jan-Benedict Glaw
Right... It works as expectes and tried hard to build a consistent kernel (actually, you did a great job at that!).
Most kudos goes to Kai Germaschewski.
Sam