LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* No forces rebuild while changing GCC?
@ 2004-05-20 18:16 Jan-Benedict Glaw
  2004-05-20 18:56 ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2004-05-20 18:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Sam Ravnborg

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

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

-- 
   Jan-Benedict Glaw       jbglaw@lug-owl.de    . +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));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: No forces rebuild while changing GCC?
  2004-05-20 18:16 No forces rebuild while changing GCC? Jan-Benedict Glaw
@ 2004-05-20 18:56 ` Sam Ravnborg
  2004-05-20 20:15   ` Jan-Benedict Glaw
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2004-05-20 18:56 UTC (permalink / raw)
  To: linux-kernel, Sam Ravnborg

On Thu, May 20, 2004 at 08:16:17PM +0200, Jan-Benedict Glaw wrote:
> 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?

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: No forces rebuild while changing GCC?
  2004-05-20 18:56 ` Sam Ravnborg
@ 2004-05-20 20:15   ` Jan-Benedict Glaw
  2004-05-21 12:18     ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Jan-Benedict Glaw @ 2004-05-20 20:15 UTC (permalink / raw)
  To: linux-kernel, Sam Ravnborg

[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]

On Thu, 2004-05-20 20:56:35 +0200, Sam Ravnborg <sam@ravnborg.org>
wrote in message <20040520185635.GA4256@mars.ravnborg.org>:
> On Thu, May 20, 2004 at 08:16:17PM +0200, Jan-Benedict Glaw wrote:
[While changing gcc, ...]
> > 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.

> 2) Compiler version used for version.h
> - To avoid this remove the FORCE in init/Makefile

Done.

> 3) Usual dependencies, including stdarg.h which is part of the compiler
>    include files

Argh...

> 4) Change in configuration relevant for that specific file

Argh, too:)

> 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".

> 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!).

> 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

-- 
   Jan-Benedict Glaw       jbglaw@lug-owl.de    . +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));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: No forces rebuild while changing GCC?
  2004-05-20 20:15   ` Jan-Benedict Glaw
@ 2004-05-21 12:18     ` Sam Ravnborg
  0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2004-05-21 12:18 UTC (permalink / raw)
  To: linux-kernel, Sam Ravnborg, Kai Germaschewski

On Thu, May 20, 2004 at 10:15:41PM +0200, Jan-Benedict Glaw wrote:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-21 12:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-20 18:16 No forces rebuild while changing GCC? Jan-Benedict Glaw
2004-05-20 18:56 ` Sam Ravnborg
2004-05-20 20:15   ` Jan-Benedict Glaw
2004-05-21 12:18     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).