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]

Fix Solaris 8 bootstrap (PR bootstrap/43870)


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


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