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]

[vta/trunk?] bootstrap-compare everything, not just gcc


This patch arranges for the compare that follows a bootstrapped build
of gcc and libgcc to compare not only the gcc directory, but also all
other staged directories.

This is useful to detect codegen differences in subdirectories other
than gcc, including in target libraries.  With make bootstrap, it will
only compare libgcc, but following bootstrap by bootstrap4, and then
re-running compare3 after bootstrap4 rebuilds target libraries (it
will normally run after building libgcc), all target libraries are
compared.

Is it too late to make this kind of change for 4.3?

for  ChangeLog .vta?
from  Alexandre Oliva  <aoliva@redhat.com>

	* Makefile.tpl ([+compare-target+]): Compare all stage
	directories, rather than just gcc.
	* Makefile.in: Rebuilt.

Index: Makefile.tpl
===================================================================
--- Makefile.tpl.orig	2007-10-30 02:31:25.000000000 -0200
+++ Makefile.tpl	2007-10-30 02:31:36.000000000 -0200
@@ -1333,15 +1333,16 @@ do-clean: clean-stage[+id+]
 	: $(MAKE); $(stage); \
 	rm -f .bad_compare ; \
 	echo Comparing stages [+prev+] and [+id+] ; \
-	cd stage[+id+]-gcc; \
-	files=`find . -name "*$(objext)" -print` ; \
-	cd .. ; \
+        sed=`echo stage[+id+] | sed 's,^stage,,;s,.,.,g'`; \
+	files=`find stage[+id+]-* -name "*$(objext)" -print | \
+		 sed -n s,^stage$$sed-,,p` ; \
 	for file in $${files} ; do \
-	  f1=$$r/stage[+prev+]-gcc/$$file; f2=$$r/stage[+id+]-gcc/$$file; \
+	  f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \
+	  if test ! -f $$f1; then continue; fi; \
 	  $(do-[+compare-target+]) > /dev/null 2>&1; \
 	  if test $$? -eq 1; then \
 	    case $$file in \
-	      ./cc*-checksum$(objext) | ./libgcc/* ) \
+	      gcc/cc*-checksum$(objext) | ./libgcc/* ) \
 	        echo warning: $$file differs ;; \
 	      *) \
 	        echo $$file differs >> .bad_compare ;; \
Index: Makefile.in
===================================================================
--- Makefile.in.orig	2007-10-30 02:31:25.000000000 -0200
+++ Makefile.in	2007-10-30 02:31:41.000000000 -0200
@@ -50065,15 +50065,16 @@ compare:
 	: $(MAKE); $(stage); \
 	rm -f .bad_compare ; \
 	echo Comparing stages 2 and 3 ; \
-	cd stage3-gcc; \
-	files=`find . -name "*$(objext)" -print` ; \
-	cd .. ; \
+        sed=`echo stage3 | sed 's,^stage,,;s,.,.,g'`; \
+	files=`find stage3-* -name "*$(objext)" -print | \
+		 sed -n s,^stage$$sed-,,p` ; \
 	for file in $${files} ; do \
-	  f1=$$r/stage2-gcc/$$file; f2=$$r/stage3-gcc/$$file; \
+	  f1=$$r/stage2-$$file; f2=$$r/stage3-$$file; \
+	  if test ! -f $$f1; then continue; fi; \
 	  $(do-compare) > /dev/null 2>&1; \
 	  if test $$? -eq 1; then \
 	    case $$file in \
-	      ./cc*-checksum$(objext) | ./libgcc/* ) \
+	      gcc/cc*-checksum$(objext) | ./libgcc/* ) \
 	        echo warning: $$file differs ;; \
 	      *) \
 	        echo $$file differs >> .bad_compare ;; \
@@ -50351,15 +50352,16 @@ compare-debug:
 	: $(MAKE); $(stage); \
 	rm -f .bad_compare ; \
 	echo Comparing stages b2g0 and b3g2 ; \
-	cd stageb3g2-gcc; \
-	files=`find . -name "*$(objext)" -print` ; \
-	cd .. ; \
+        sed=`echo stageb3g2 | sed 's,^stage,,;s,.,.,g'`; \
+	files=`find stageb3g2-* -name "*$(objext)" -print | \
+		 sed -n s,^stage$$sed-,,p` ; \
 	for file in $${files} ; do \
-	  f1=$$r/stageb2g0-gcc/$$file; f2=$$r/stageb3g2-gcc/$$file; \
+	  f1=$$r/stageb2g0-$$file; f2=$$r/stageb3g2-$$file; \
+	  if test ! -f $$f1; then continue; fi; \
 	  $(do-compare-debug) > /dev/null 2>&1; \
 	  if test $$? -eq 1; then \
 	    case $$file in \
-	      ./cc*-checksum$(objext) | ./libgcc/* ) \
+	      gcc/cc*-checksum$(objext) | ./libgcc/* ) \
 	        echo warning: $$file differs ;; \
 	      *) \
 	        echo $$file differs >> .bad_compare ;; \
@@ -50637,15 +50639,16 @@ compare3:
 	: $(MAKE); $(stage); \
 	rm -f .bad_compare ; \
 	echo Comparing stages 3 and 4 ; \
-	cd stage4-gcc; \
-	files=`find . -name "*$(objext)" -print` ; \
-	cd .. ; \
+        sed=`echo stage4 | sed 's,^stage,,;s,.,.,g'`; \
+	files=`find stage4-* -name "*$(objext)" -print | \
+		 sed -n s,^stage$$sed-,,p` ; \
 	for file in $${files} ; do \
-	  f1=$$r/stage3-gcc/$$file; f2=$$r/stage4-gcc/$$file; \
+	  f1=$$r/stage3-$$file; f2=$$r/stage4-$$file; \
+	  if test ! -f $$f1; then continue; fi; \
 	  $(do-compare3) > /dev/null 2>&1; \
 	  if test $$? -eq 1; then \
 	    case $$file in \
-	      ./cc*-checksum$(objext) | ./libgcc/* ) \
+	      gcc/cc*-checksum$(objext) | ./libgcc/* ) \
 	        echo warning: $$file differs ;; \
 	      *) \
 	        echo $$file differs >> .bad_compare ;; \
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

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