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]

Re: Simplify Solaris configuration


Eric,

>> At least I can build the 64-bit libgcc now, but the 32-bit one fails for
>> unrelated reasons:
>>
>> configure:3247: checking for suffix of object files
>> configure:3269: /var/gcc/gcc-4.7.0-20110622/11-gcc/./gcc/xgcc
>> -B/var/gcc/gcc-4.7.0-20110622/11-gcc/./gcc/
>> -B/usr/local/sparcv9-sun-solaris2.11/bin/
>> -B/usr/local/sparcv9-sun-solaris2.11/lib/ -isystem
>> /usr/local/sparcv9-sun-solaris2.11/include -isystem
>> /usr/local/sparcv9-sun-solaris2.11/sys-include  -m32 -c -g -O2  conftest.c
>> >&5 conftest.c:16:1: internal compiler error: in simplify_subreg, at
>> simplify-rtx.c:5362
>
> It's very likely the same problem, the options -mptr32 -mno-stack-bias aren't 
> passed to cc1 anymore.

right. sparc/sol2-64.h was included too late.  The following patch fixes
this.  Other approaches to reordering the headers ran into various
issues since TARGET_DEFAULT is defined and redefined in several places.

The patch allowed a sparcv9-sun-solaris2.11 bootstrap to run well into
building the target libraries (failed configuring libgfortran since I'd
mis-merged the 32-bit and 64-bit gmp.h), a sparc-sun-solaris2.10
bootstrap is still running.

I'll probably fix the gmp.h issue, rebuild the sparcv9-sun-solaris2.11
configuration and commit unless I find problems or you disapprove of the
approach.

	Rainer


2011-06-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config/sparc/sol2-64.h (TARGET_DEFAULT): Remove.
	(TARGET_64BIT_DEFAULT): Define.
	* config.gcc (sparc*-*-solaris2*): Move sparc/sol2-64.h to front
	of tm_file.
	* config/sparc/sol2.h [TARGET_64BIT_DEFAULT] (TARGET_DEFAULT): Define.

diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2482,7 +2482,7 @@ sparc*-*-solaris2*)
 	tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sol2-bi.h"
 	case ${target} in
 	    sparc64-*-* | sparcv9-*-*)
-		tm_file="${tm_file} sparc/sol2-64.h"
+		tm_file="sparc/sol2-64.h ${tm_file}"
 		;;
 	    *)
 		test x$with_cpu != x || with_cpu=v9
diff --git a/gcc/config/sparc/sol2-64.h b/gcc/config/sparc/sol2-64.h
--- a/gcc/config/sparc/sol2-64.h
+++ b/gcc/config/sparc/sol2-64.h
@@ -1,7 +1,7 @@
 /* Definitions of target machine for GCC, for bi-arch SPARC
    running Solaris 2, defaulting to 64-bit code generation.
 
-   Copyright (C) 1999, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2010, 2011 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -19,7 +19,4 @@ You should have received a copy of the G
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT \
-  (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
-   MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
+#define TARGET_64BIT_DEFAULT 1
diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h
--- a/gcc/config/sparc/sol2.h
+++ b/gcc/config/sparc/sol2.h
@@ -20,11 +20,17 @@ You should have received a copy of the G
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
+#undef TARGET_DEFAULT
+#ifdef TARGET_64BIT_DEFAULT
+#define TARGET_DEFAULT \
+  (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
+   MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
+#else
 /* Solaris allows 64 bit out and global registers in 32 bit mode.
    sparc_override_options will disable V8+ if not generating V9 code.  */
-#undef TARGET_DEFAULT
 #define TARGET_DEFAULT (MASK_V8PLUS + MASK_APP_REGS + MASK_FPU \
 			+ MASK_LONG_DOUBLE_128)
+#endif
 
 /* The default code model used to be CM_MEDANY on Solaris
    but even Sun eventually found it to be quite wasteful


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


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