c/912: 64-bit cross compiler failure on 32-bit hosts
matthew green
mrg@everglades.eterna.com.au
Mon Nov 27 22:36:00 GMT 2000
>Number: 912
>Category: c
>Synopsis: TImode shouldn't be used on 32-bit hosts.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 27 22:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: matthew green
>Release: 2.97 20001126 (experimental)
>Organization:
people's front against (bozotic) www (softwar foundation)
>Environment:
System: NetBSD everglades.eterna.com.au 1.5K NetBSD 1.5K (EVERGLADES) #49: Sun Nov 19 10:35:27 EST 2000 mrg@everglades.eterna.com.au:/orb/j/src/sys/arch/sparc64/compile/EVERGLADES sparc64
host: sparc-unknown-netbsd
build: sparc-unknown-netbsd
target: sparc64-elf
configured with: /croc/mrg/gcc/egcs/configure --prefix=/usr/toolchain sparc64-elf
>Description:
while building a sparc64-elf compiler, the compilation of libgcc fails
due to attempts to use TImode on a 32-bit host. most of the system
correctly tests for this, but libgcc2.h has regressed since GCC 2.95.2.
/croc/mrg/gcc/egcs/gcc/libgcc2.h:99: no data type for mode `TI'
/croc/mrg/gcc/egcs/gcc/libgcc2.h:100: no data type for mode `TI'
>How-To-Repeat:
build a compiler --target=sparc64-elf on a x86 box.
>Fix:
this patch solves the problem:
2000-11-28 matthew green <mrg@eterna.com.au>
* libgcc2.h (TItype): Don't define on 32-bit hosts.
(UTItype): Likewise.
Index: libgcc2.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/libgcc2.h,v
retrieving revision 1.10
diff -p -r1.10 libgcc2.h
*** libgcc2.h 2000/10/20 23:32:09 1.10
--- libgcc2.h 2000/11/28 06:19:38
*************** typedef unsigned int USItype __attribute
*** 94,101 ****
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2 */
typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
! #if MIN_UNITS_PER_WORD > 4
! /* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4 */
typedef int TItype __attribute__ ((mode (TI)));
typedef unsigned int UTItype __attribute__ ((mode (TI)));
#endif
--- 94,102 ----
/* These typedefs are usually forbidden on archs with UNITS_PER_WORD 2 */
typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
! #if MIN_UNITS_PER_WORD > 4 && HOST_BITS_PER_WIDE_INT >= 64
! /* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4,
! and require host support as well. */
typedef int TItype __attribute__ ((mode (TI)));
typedef unsigned int UTItype __attribute__ ((mode (TI)));
#endif
*************** typedef int word_type __attribute__ ((mo
*** 153,159 ****
#define float bogus_type
#define double bogus_type
! #if MIN_UNITS_PER_WORD > 4
#define W_TYPE_SIZE (8 * BITS_PER_UNIT)
#define Wtype DItype
#define UWtype UDItype
--- 154,160 ----
#define float bogus_type
#define double bogus_type
! #if MIN_UNITS_PER_WORD > 4 && HOST_BITS_PER_WIDE_INT >= 64
#define W_TYPE_SIZE (8 * BITS_PER_UNIT)
#define Wtype DItype
#define UWtype UDItype
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list