diff mbox

Simplify Solaris configuration

Message ID ydd1uyf9rog.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth June 27, 2011, 4:15 p.m. UTC
Eric,

>> All bootstraps completed without regressions, so I've installed the
>> patch.  I'll address eventual issues and further simplifications as a
>> followup.
>
> I cannot bootstrap SPARC64/Solaris anymore though:
[...]
> from /nile.build/botcazou/gcc-head/src/libgcc/../gcc/libgcc2.c:29:
> /usr/include/sys/isa_defs.h:280:2: error: #error "SPARC Versions 8 and 9 are 
> mutually exclusive choices"
> /usr/include/sys/isa_defs.h:376:2: error: #error "Both _ILP32 and _LP64 are 
> defined"

sorry about that: I don't test the 64-bit default configurations so far,
and didn't even have the necessary support libs around to do so.  The
problem was that sparc/sol2-64.h was included too late and
DEFAULT_ARCH32_P was wrong for those configurations.

The following patch should fix this:

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

	* config.gcc (sparc*-*-solaris2*): Move sol2-bi.h after
	sparc/sol2-64.h.


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

	Rainer

Comments

Eric Botcazou June 27, 2011, 6:02 p.m. UTC | #1
> sorry about that: I don't test the 64-bit default configurations so far,
> and didn't even have the necessary support libs around to do so.  The
> problem was that sparc/sol2-64.h was included too late and
> DEFAULT_ARCH32_P was wrong for those configurations.
>
> The following patch should fix this:
>
> 2011-06-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	* config.gcc (sparc*-*-solaris2*): Move sol2-bi.h after
> 	sparc/sol2-64.h.

Thanks.

> 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.
diff mbox

Patch

diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2476,7 +2476,7 @@  sparc-*-netbsdelf*)
 	extra_options="${extra_options} sparc/long-double-switch.opt"
 	;;
 sparc*-*-solaris2*)
-	tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sol2-bi.h"
+	tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file}"
 	case ${target} in
 	    sparc64-*-* | sparcv9-*-*)
 		tm_file="${tm_file} sparc/sol2-64.h"
@@ -2485,6 +2485,7 @@  sparc*-*-solaris2*)
 		test x$with_cpu != x || with_cpu=v9
 		;;
 	esac
+	tm_file="${tm_file} sol2-bi.h"
 	tmake_file="${tmake_file} sparc/t-sol2-64"
 	;;
 sparc-wrs-vxworks)