This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix libcpp dependency generation for toplevel bootstrap


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]