This is the mail archive of the gcc-bugs@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]

[Bug bootstrap/16399] New: First "make bootstrap" succeeds while the second doesn't, even if nothing changed


Nicely summarised by Jim Wilson:

-------------------------------- 8< --------------------------------
Ranjit Mathew wrote:
>     I've noticed this quite a few times but only sometimes
> can I reproduce this cleanly. What happens is:
> 1. Bootstrap from clean sources in a clean folder.
> 2. Change something in a front-end (say Java).
> 3. Rebootstrap. Everything goes through fine.
> 4. Rebootstrap without changing anything, but now I get
> bootstrap comparison failures for files touched in #2.

This is trivial to reproduce, and it isn't hard to see why.  What I did
was a C only bootstrap, and then I added "int phony = 100;" to the end
of dwarf2out.c.

What happened is that a top level bootstrap calls the gcc bootstrap
rule, which has no dependencies on the source code.  This emits a
helpful message saying that bootstrap is finished, and you probably
meant to do something else.  The top level bootstrap rule then does a
file compare which passes because nothing changed.  The top level
bootstrap then tries to build the libraries.  But some of the libraries
have a dependence on gcc, which depends on its source files, so now cc1
gets rebuilt.  Meanwhile, the helpful message from the gcc bootstrap
rule gets lost in the make noise.

Next time you do a bootstrap, you get the same sequence, except the file
compare fails this time because files have changed.

This seems to be a design conflict between the top level and gcc
bootstrap rules.  What the gcc bootstrap rule is doing makes sense if
bootstrap is completely controlled by gcc, but it does not seem to make
sense when the bootstrap process is controlled by the toplevel Makefile.
-------------------------------- 8< --------------------------------

-- 
           Summary: First "make bootstrap" succeeds while the second
                    doesn't, even if nothing changed
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rmathew at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16399


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