This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix libcpp dependency generation for toplevel bootstrap
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>, Andrew Pinski <pinskia at physics dot uc dot edu>, gcc-patches at gcc dot gnu dot org
- Date: 17 Dec 2005 20:08:17 +0100
- Subject: Re: [PATCH] Fix libcpp dependency generation for toplevel bootstrap
- References: <cd5403f4f5a69a5124a12c1eae63fc5f@physics.uc.edu> <43A28342.8000005@lu.unisi.ch> <20051216135419.GA27872@nevyn.them.org> <m364ppoyva.fsf@uniton.integrable-solutions.net> <43A2D3B9.2050200@lu.unisi.ch> <20051216145126.GA29202@nevyn.them.org> <20051216152251.GA29951@nevyn.them.org> <43A2DC95.9090407@lu.unisi.ch> <m34q58h9vn.fsf@uniton.integrable-solutions.net> <20051217173654.GA16332@nevyn.them.org>
Daniel Jacobowitz <drow@false.org> writes:
| [Copied back to the list; I hope you don't mind.
That is fine. I very much appreciate both of you looking into this.
| I was halfway through writing this when I saw Paolo's response.]
[...]
| Fascinating! I think I see why this happened for you and not for me: I
| tried it from a clean install dir, but it looks like you're using a
| single --prefix that you've installed into before. Is that right?
Yes, you're correct.
| Here's why libcpp gets rebuilt:
|
| Prerequisite `/home/gdr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/limits.h' is newer than target `charset.o'.
|
| The compiled libcpp depends on the limits.h in your $PREFIX.
Aha!
| libcpp is
| a host library, so it ought to be using the limits.h in the current
| compiler's build directory, but it's searching the installed path
| first. Of course, we install limits.h into that same path, so when we
| go to install libcpp, it appears to be out of date.
Thanks for the investigation and the explanation!
| A couple of points here:
| - We should be using the limits.h in the build tree, not the one in
| the install tree, during a bootstrap. That would fix this.
| - We should be passing appropriate flags to 'make install' so that
| the correct compiler is found when this happens. That would
| "fix" this - libcpp would still be rebuilt, but it would be
| rebuilt correctly.
| - Whether Paolo's change to use -MMD is correct or not is just a
| question of point of view; I'd rather we didn't have to apply it,
| but it definitely ought to avoid this problem.
|
| I'll see if I can make some progress on those first two today.
Many thanks. I suspect that would also solve Andrew Pinski's issue.
-- Gaby