This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to fix sparc-sun-solaris2.7 bootstrap (version 2)
- To: rth at redhat dot com
- Subject: Patch to fix sparc-sun-solaris2.7 bootstrap (version 2)
- From: John Wehle <john at feith dot com>
- Date: Tue, 2 Oct 2001 23:21:32 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org, pfeifer at dbai dot tuwien dot ac dot at, lucier at math dot purdue dot edu
[ This version is less intrusive. ]
Attempting to bootstrap on Solaris SPARC fails with:
/usr/local/build/sparc-sun-solaris2.7/GNU/gcc-current/gcc/xgcc -B/usr/local/build/sparc-sun-solaris2.7/GNU/gcc-current/gcc/ -B/usr/local/sparc-sun-solaris2.7/bin/ -B/usr/local/sparc-sun-solaris2.7/lib/ -isystem /usr/local/sparc-sun-solaris2.7/include -fgnu-runtime -c -I. -I../../../../../../src/GNU/gcc-current/libobjc -g -O2 -DHAVE_GTHR_DEFAULT -DIN_GCC -DIN_TARGET_LIBS -I../../../../../../src/GNU/gcc-current/libobjc/objc -I../../../../../../src/GNU/gcc-current/libobjc/../gcc -I../../../../../../src/GNU/gcc-current/libobjc/../gcc/config -I../../gcc -I../../../../../../src/GNU/gcc-current/libobjc/../include ../../../../../../src/GNU/gcc-current/libobjc/linking.m -o linking.o
/usr/ccs/bin/as: "/var/tmp//ccwjdWLL.s", line 171: error: cannot use v9 instructions in a non-v9 target binary
make[2]: *** [linking.lo] Error 1
due to gcc outputing .uaxword which the Sun assembler dislikes when targeting
the 32 bit instruction set.
This patch allows Solaris 7 SPARC to bootstrap.
ChangeLog:
Tue Oct 2 20:36:40 EDT 2001 John Wehle (john@feith.com)
* dwarf2asm.c (unaligned_integer_asm_op): Abort if
op is NULL.
* sparc/sysv4.h (UNALIGNED_DOUBLE_INT_ASM_OP): Use
only if TARGET_ARCH64.
Enjoy!
-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/dwarf2asm.c.ORIGINAL Wed Aug 29 17:24:06 2001
--- gcc/dwarf2asm.c Tue Oct 2 16:52:01 2001
*************** static inline const char *
*** 54,60 ****
unaligned_integer_asm_op (size)
int size;
{
! const char *op;
switch (size)
{
case 1:
--- 54,60 ----
unaligned_integer_asm_op (size)
int size;
{
! const char *op = NULL;
switch (size)
{
case 1:
*************** unaligned_integer_asm_op (size)
*** 74,79 ****
--- 74,83 ----
default:
abort ();
}
+
+ if (! op)
+ abort ();
+
return op;
}
#endif /* UNALIGNED_INT_ASM_OP */
*** gcc/config/sparc/sysv4.h.ORIGINAL Tue Oct 2 20:32:33 2001
--- gcc/config/sparc/sysv4.h Mon Oct 1 00:19:49 2001
*************** Boston, MA 02111-1307, USA. */
*** 96,102 ****
#define STRING_ASM_OP "\t.asciz\t"
#define COMMON_ASM_OP "\t.common\t"
#define SKIP_ASM_OP "\t.skip\t"
! #define UNALIGNED_DOUBLE_INT_ASM_OP "\t.uaxword\t"
#define UNALIGNED_INT_ASM_OP "\t.uaword\t"
#define UNALIGNED_SHORT_ASM_OP "\t.uahalf\t"
#define PUSHSECTION_ASM_OP "\t.pushsection\t"
--- 96,102 ----
#define STRING_ASM_OP "\t.asciz\t"
#define COMMON_ASM_OP "\t.common\t"
#define SKIP_ASM_OP "\t.skip\t"
! #define UNALIGNED_DOUBLE_INT_ASM_OP (TARGET_ARCH64 ? "\t.uaxword\t" : NULL)
#define UNALIGNED_INT_ASM_OP "\t.uaword\t"
#define UNALIGNED_SHORT_ASM_OP "\t.uahalf\t"
#define PUSHSECTION_ASM_OP "\t.pushsection\t"
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------