Make-lang.in (cc1-checksum.c): For stage-final re-use the checksum from the previous...
authorRichard Biener <rguenther@suse.de>
Tue, 3 May 2016 08:14:27 +0000 (08:14 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 3 May 2016 08:14:27 +0000 (08:14 +0000)
2016-05-03  Richard Biener  <rguenther@suse.de>

c/
* Make-lang.in (cc1-checksum.c): For stage-final re-use
the checksum from the previous stage.

cp/
* Make-lang.in (cc1plus-checksum.c): For stage-final re-use
the checksum from the previous stage.

From-SVN: r235804

gcc/c/ChangeLog
gcc/c/Make-lang.in
gcc/cp/ChangeLog
gcc/cp/Make-lang.in

index a90972e7e0996f1dc1b9476dfb6ddb10cd8a3bc8..ae6275968c6bf36ea9842c1ae786d7b475159ec2 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-03  Richard Biener  <rguenther@suse.de>
+
+       * Make-lang.in (cc1-checksum.c): For stage-final re-use
+       the checksum from the previous stage.
+
 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
 
        * c-parser.c (c_parser_oacc_all_clauses): Update call to
index 8525707f9966ac78fd70d003478f73b753c4d522..34c8b0ed856651075549b9cfb4a1665185c25035 100644 (file)
@@ -61,11 +61,18 @@ c_OBJS = $(C_OBJS) cc1-checksum.o c/gccspec.o
 c-warn = $(STRICT_WARN)
 
 # compute checksum over all object files and the options
+# re-use the checksum from the prev-final stage so it passes
+# the bootstrap comparison and allows comparing of the cc1 binary
 cc1-checksum.c : build/genchecksum$(build_exeext) checksum-options \
        $(C_OBJS) $(BACKEND) $(LIBDEPS) 
-       build/genchecksum$(build_exeext) $(C_OBJS) $(BACKEND) $(LIBDEPS) \
+       if [ -f ../stage_final ] \
+          && cmp -s ../stage_current ../stage_final; then \
+         cp ../prev-gcc/cc1-checksum.c cc1-checksum.c; \
+       else \
+         build/genchecksum$(build_exeext) $(C_OBJS) $(BACKEND) $(LIBDEPS) \
                      checksum-options > cc1-checksum.c.tmp &&           \
-       $(srcdir)/../move-if-change cc1-checksum.c.tmp cc1-checksum.c
+         $(srcdir)/../move-if-change cc1-checksum.c.tmp cc1-checksum.c; \
+       fi
 
 cc1$(exeext): $(C_OBJS) cc1-checksum.o $(BACKEND) $(LIBDEPS)
        +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
index 990ba0fb719fad746f3af60ebc8c125e47d0ff0d..497bc0ec967bf32ac016d66464fe2efe079b04ec 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-03  Richard Biener  <rguenther@suse.de>
+
+       * Make-lang.in (cc1plus-checksum.c): For stage-final re-use
+       the checksum from the previous stage.
+
 2016-05-02  David Malcolm  <dmalcolm@redhat.com>
 
        PR c++/62314
index 8770f6ff1bed4bb016f5ca20b515393ef8defb29..625a77c53867abc33531f3c66af29a807f273c03 100644 (file)
@@ -90,11 +90,18 @@ c++_OBJS = $(CXX_OBJS) cc1plus-checksum.o cp/g++spec.o
 cp-warn = $(STRICT_WARN)
 
 # compute checksum over all object files and the options
+# re-use the checksum from the prev-final stage so it passes
+# the bootstrap comparison and allows comparing of the cc1 binary
 cc1plus-checksum.c : build/genchecksum$(build_exeext) checksum-options \
        $(CXX_OBJS) $(BACKEND) $(LIBDEPS) 
-       build/genchecksum$(build_exeext) $(CXX_OBJS) $(BACKEND) $(LIBDEPS) \
+       if [ -f ../stage_final ] \
+          && cmp -s ../stage_current ../stage_final; then \
+          cp ../prev-gcc/cc1plus-checksum.c cc1plus-checksum.c; \
+       else \
+         build/genchecksum$(build_exeext) $(CXX_OBJS) $(BACKEND) $(LIBDEPS) \
                      checksum-options > cc1plus-checksum.c.tmp &&         \
-       $(srcdir)/../move-if-change cc1plus-checksum.c.tmp cc1plus-checksum.c
+         $(srcdir)/../move-if-change cc1plus-checksum.c.tmp cc1plus-checksum.c; \
+       fi
 
 cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBDEPS)
        +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \