This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
-m64 fixed on Solaris 2.7 !!
- To: Gcc bugs mailing list <gcc-bugs at gcc dot gnu dot org>
- Subject: -m64 fixed on Solaris 2.7 !!
- From: Igor Schein <igor at txc dot com>
- Date: Sun, 31 Dec 2000 00:43:57 -0500
- Cc: jakub at redhat dot com
- Reply-To: igor at txc dot com
Hi,
I finally figured out how to reactivate capability to build 64bit
binaries on Solaris 2.7. There're 2 things. First, here's the key
line:
% sed -n 3108p gcc/config.gcc
# At the moment, 32-to-64 cross compilation doesn't work.
The whole section below it is commented out. Someone observed that
building dual-arch compiler fails and disabled it altogether. So I
went back and eventually found this:
revision 1.7883
date: 2000/09/26 14:14:31; author: jakub; state: Exp; lines: +8 -0
* config/sparc/sparc.c (sparc_emit_set_const64): Don't abort when
op0 is a SUBREG.
(function_arg_slotno): Accept TImode/CTImode.
* config/sparc/sparc.h (MIN_UNITS_PER_WORD): If IN_LIBGCC2 define
to UNITS_PER_WORD.
This is the change which started failing bootstrap in the first place.
Reverting it enabled me to build a working 64-bit gcc-2.97 compiler.
Attached is the patch which summarized the above changes required to
hack things into working ( applicable to the current tree ). However,
I'd greatly appreciate if Jakub could find some time at some point to
review his Sep 26 change and adjust it to properly re-enable 64bit
compiling in the main tree,since I'm not qualified to do that. I'm
sure I'm not alone in asking this.
Thanks
Igor
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.15
diff -u -r1.15 config.gcc
--- gcc/config.gcc 2000/12/18 23:58:15 1.15
+++ gcc/config.gcc 2000/12/31 05:21:36
@@ -3106,18 +3106,18 @@
xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
# At the moment, 32-to-64 cross compilation doesn't work.
-# case $machine in
-# *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
-# *-*-solaris2*)
-# if test x$gnu_ld = xyes
-# then
-# tm_file=sparc/sol2-64.h
-# else
-# tm_file=sparc/sol2-sld-64.h
-# fi
-# tmake_file="$tmake_file sparc/t-sol2-64"
-# ;;
-# esac
+ case $machine in
+ *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
+ *-*-solaris2*)
+ if test x$gnu_ld = xyes
+ then
+ tm_file=sparc/sol2-64.h
+ else
+ tm_file=sparc/sol2-sld-64.h
+ fi
+ tmake_file="$tmake_file sparc/t-sol2-64"
+ ;;
+ esac
case $machine in
*-*-solaris2.[0-4])
float_format=i128
Index: gcc/config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.127
retrieving revision 1.126
diff -u -r1.127 -r1.126
--- gcc/config/sparc/sparc.c 2000/09/26 14:14:34 1.127
+++ gcc/config/sparc/sparc.c 2000/08/24 20:31:35 1.126
@@ -1832,17 +1832,12 @@
rtx temp;
/* Sanity check that we know what we are working with. */
- if (! TARGET_ARCH64)
+ if (! TARGET_ARCH64
+ || GET_CODE (op0) != REG
+ || (REGNO (op0) >= SPARC_FIRST_FP_REG
+ && REGNO (op0) <= SPARC_LAST_V9_FP_REG))
abort ();
- if (GET_CODE (op0) != SUBREG)
- {
- if (GET_CODE (op0) != REG
- || (REGNO (op0) >= SPARC_FIRST_FP_REG
- && REGNO (op0) <= SPARC_LAST_V9_FP_REG))
- abort ();
- }
-
if (reload_in_progress || reload_completed)
temp = op0;
else
@@ -3976,7 +3971,6 @@
case HImode : case CHImode :
case SImode : case CSImode :
case DImode : case CDImode :
- case TImode : case CTImode :
if (slotno >= SPARC_INT_ARG_MAX)
return -1;
regno = regbase + slotno;
Index: gcc/config/sparc/sparc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.h,v
retrieving revision 1.119
retrieving revision 1.118
diff -u -r1.119 -r1.118
--- gcc/config/sparc/sparc.h 2000/09/26 14:14:34 1.119
+++ gcc/config/sparc/sparc.h 2000/09/25 13:39:45 1.118
@@ -765,11 +765,7 @@
/* Width of a word, in units (bytes). */
#define UNITS_PER_WORD (TARGET_ARCH64 ? 8 : 4)
-#ifdef IN_LIBGCC2
-#define MIN_UNITS_PER_WORD UNITS_PER_WORD
-#else
#define MIN_UNITS_PER_WORD 4
-#endif
/* Now define the sizes of the C data types. */