Fix Solaris 8 bootstrap (PR bootstrap/43870)

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Thu May 20 11:01:00 GMT 2010


GCC fails to bootstrap on Solaris 8 (ICE in stage 1 libgcc) since its
qsort is quite picky about the stability of the sort function, as
already observed in PR tree-optimization/42157.

Kenneth provided the following patch, which allowed a i386-pc-solaris2.8
mainline bootstrap to build the target libraries until it failed linking
libjava support programs due to PR target/44132.

Ok for mainline, 4.5 and 4.4 branches?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2010-05-19  Kenneth Zadeck  <zadeck@naturalbridge.com>

	PR bootstrap/43870
	* df-scan.c (df_ref_compare): Stabilize sort.

Fix Solaris 8/x86 bootstrap (PR bootstrap/43870)

diff -r e5f5ae7b865f gcc/df-scan.c
--- a/gcc/df-scan.c	Wed May 19 16:33:02 2010 +0200
+++ b/gcc/df-scan.c	Wed May 19 16:35:12 2010 +0200
@@ -2396,7 +2396,7 @@
       if (DF_REF_EXTRACT_MODE (ref1) != DF_REF_EXTRACT_MODE (ref2))
 	return DF_REF_EXTRACT_MODE (ref1) - DF_REF_EXTRACT_MODE (ref2);
     }
-  return 0;
+  return (int)DF_REF_ORDER (ref1) - (int)DF_REF_ORDER (ref2);
 }
 
 static void



More information about the Gcc-patches mailing list