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]

4.4/4.5 PATCH: Fix i686-pc-solaris2 bootstrap (PR bootstrap/40027)


As reported in PR bootstrap/40027, GCC 4.4 and mainline don't bootstrap
with --built=i686-pc-solaris2.  This is due to the fact that older versions
of Sun ld don't handle hidden .gnu.linkonce sections correctly.  Instead of
completely disabling .hidden support with Sun ld, I've chosen to disable
USE_HIDDEN_LINKONCE, as Jakub suggested.  While everything works fine on
recent version of Solaris Express/OpenSolaris, it seems that fixes for
several ld bugs are necessary, so it seems much easier to disable
USE_HIDDEN_LINKONCE wholesale.

The following patch does this.  The Solaris definition needs to go into
i386/sol2.h, not i386/sol2-10.h, since Sun ld has basic .hidden support
enabled since Solaris 9.

Bootstrapped on i386-pc-solaris2.10 without regressions,
i686-pc-solaris2.10 works now.  Although there are some testsuite
differences between i386-pc-solaris2.10 and i686-pc-solaris2.10:

--- ../10-gcc/mail-report.log	Tue May 12 17:28:11 2009
+++ ../10-gcc-i686/mail-report.log	Wed May 13 01:20:32 2009
@@ -6,49 +6,45 @@
 		=== acats Summary ===
 # of expected passes		2315
 # of unexpected failures	0
-Native configuration is i386-pc-solaris2.10
+Native configuration is i686-pc-solaris2.10
 
-XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors)
-XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors)
 
-XPASS: g++.old-deja/g++.oliva/dwarf2.C (test for excess errors)
-XPASS: g++.old-deja/g++.oliva/dwarf3.C (test for excess errors)

-XPASS: largefile.c  -Os  (test for excess errors)

-FAIL: gcc.dg/torture/complex-sign-mul-minus-one.c  -O3 -fomit-frame-pointer  execution test
-FAIL: gcc.dg/torture/complex-sign-mul-minus-one.c  -O3 -fomit-frame-pointer -funroll-loops  execution test
-FAIL: gcc.dg/torture/complex-sign-mul-minus-one.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
-FAIL: gcc.dg/torture/complex-sign-mul-one.c  -O3 -fomit-frame-pointer  execution test
-FAIL: gcc.dg/torture/complex-sign-mul-one.c  -O3 -fomit-frame-pointer -funroll-loops  execution test
-FAIL: gcc.dg/torture/complex-sign-mul-one.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test

-XPASS: gcc.dg/tree-ssa/20040204-1.c scan-tree-dump-times optimized "link_error" 0

-FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "converted loop nest to perfect loop nest" 1
-FAIL: gcc.dg/tree-ssa/ltrans-1.c scan-tree-dump-times ltrans "transformed loop" 1
-FAIL: gcc.dg/tree-ssa/ltrans-3.c scan-tree-dump-times ltrans "transformed loop" 1
-FAIL: gcc.dg/tree-ssa/ltrans-4.c scan-tree-dump-times ltrans "transformed loop" 1
-FAIL: gcc.dg/tree-ssa/ltrans-5.c scan-tree-dump-times ltrans "transformed loop" 1
-FAIL: gcc.dg/tree-ssa/ltrans-6.c scan-tree-dump-times ltrans "transformed loop" 1
-FAIL: gcc.dg/tree-ssa/ltrans-8.c scan-tree-dump-times ltrans "transformed loop" 1
-FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "[xy][^ ]* !=" 0
-FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times dom1 "x[^ ]* & y" 1
-FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "x[^ ]* [|] y" 1

-XPASS: largefile.c  -Os  (test for excess errors)

-FAIL: gfortran.dg/ltrans-7.f90  -O  scan-tree-dump-times ltrans "transformed loop" 1

+FAIL: events output

-FAIL: 23_containers/forward_list/ext_pointer/operations/4.cc (test for excess errors)
-WARNING: 23_containers/forward_list/ext_pointer/operations/4.cc compilation failed to produce executable

there's only one new FAIL, several missing XPASSes and a couple of tests
that now pass (which may indicate that they are wrong on i386).

So overall, this seems like progress compared to the previous bootstrap
failure.

I'm currently performing tests on the 4.4 branch; if all goes well, I'd
like to check in the patch there as well.

Ok for 4.4 branch and mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Tue May 12 11:03:03 2009  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	PR bootstrap/40027
	* config/i386/i386.c (USE_HIDDEN_LINKONCE): Only define if missing.
	* config/i386/sol2.h [!TARGET_GNU_LD] (USE_HIDDEN_LINKONCE): Define.

Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 147380)
+++ gcc/config/i386/i386.c	(working copy)
@@ -7412,10 +7412,12 @@ ix86_setup_frame_addresses (void)
   cfun->machine->accesses_prev_frame = 1;
 }
 
-#if (defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)) || TARGET_MACHO
-# define USE_HIDDEN_LINKONCE 1
-#else
-# define USE_HIDDEN_LINKONCE 0
+#ifndef USE_HIDDEN_LINKONCE
+# if (defined(HAVE_GAS_HIDDEN) && (SUPPORTS_ONE_ONLY - 0)) || TARGET_MACHO
+#  define USE_HIDDEN_LINKONCE 1
+# else
+#  define USE_HIDDEN_LINKONCE 0
+# endif
 #endif
 
 static int pic_labels_used;
Index: gcc/config/i386/sol2.h
===================================================================
--- gcc/config/i386/sol2.h	(revision 147380)
+++ gcc/config/i386/sol2.h	(working copy)
@@ -1,6 +1,6 @@
 /* Target definitions for GCC for Intel 80386 running Solaris 2
    Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2007, 2008 Free Software Foundation, Inc.
+   2004, 2007, 2008, 2009 Free Software Foundation, Inc.
    Contributed by Fred Fish (fnf@cygnus.com).
 
 This file is part of GCC.
@@ -112,3 +112,9 @@ along with GCC; see the file COPYING3.  
 /* We do not need NT_VERSION notes.  */
 #undef X86_FILE_START_VERSION_DIRECTIVE
 #define X86_FILE_START_VERSION_DIRECTIVE false
+
+/* Only recent versions of Solaris 11 ld properly support hidden .gnu.linkonce
+   sections, so don't use them.  */
+#ifndef TARGET_GNU_LD
+#define USE_HIDDEN_LINKONCE 0
+#endif


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