Subject: toolchain/22345: gcc3 build fails on sparc64
To: None <gnats-bugs@gnats.netbsd.org>
From: None <nakayama@netbsd.org>
List: netbsd-bugs
Date: 08/03/2003 15:34:18
>Number:         22345
>Category:       toolchain
>Synopsis:       gcc3 build fails on sparc64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 03 06:35:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Takeshi Nakayama
>Release:        NetBSD 1.6W (2003-08-03)
>Organization:
Private
>Environment:
System: NetBSD eos 1.6W NetBSD 1.6W (EOS) #37: Sun Aug 3 13:36:35 JST 2003
	takeshi@eos:/sys/arch/sparc64/compile/EOS sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	On sparc64, build of gcc3 fails with the following log
	(I puts USE_TOOLS_TOOLCHAIN=no in /etc/mk.conf).

dependall ===> gnu/usr.bin/gcc3/backend
cc -pipe -O -ffixed-g4 -I. -I/usr/src/gnu/usr.bin/gcc3/backend/../arch/sparc64 -DIN_GCC -DHAVE_CONFIG_H -I/usr/src/gnu/dist/gcc/gcc -I/usr/src/gnu/dist/gcc/gcc/. -I/usr/src/gnu/dist/gcc/gcc/config -I/usr/src/gnu/dist/gcc/gcc/../include -I/usr/src/gnu/usr.bin/gcc3/backend/.. -c /usr/src/gnu/dist/gcc/gcc/gengenrtl.c
In file included from /usr/src/gnu/dist/gcc/gcc/gengenrtl.c:29:
/usr/src/gnu/dist/gcc/gcc/real.h:67: error: size of array `test_real_width' is negative
*** Error code 1

Stop.
make: stopped in /usr/src/gnu/usr.bin/gcc3/backend
*** Error code 1

>How-To-Repeat:
	make build or ./build.sh

>Fix:
	Apply this patch, or regen auto-build.h.

Index: auto-build.h
===================================================================
RCS file: /cvsroot/src/gnu/usr.bin/gcc3/arch/sparc64/auto-build.h,v
retrieving revision 1.1
diff -u -d -r1.1 auto-build.h
--- auto-build.h	2003/07/26 15:23:26	1.1
+++ auto-build.h	2003/08/03 06:19:35
@@ -311,7 +311,7 @@
 #define SIZEOF_INT 4
 
 /* The number of bytes in type long */
-#define SIZEOF_LONG 4
+#define SIZEOF_LONG 8
 
 /* The number of bytes in type long long */
 #define SIZEOF_LONG_LONG 8

>Release-Note:
>Audit-Trail:
>Unformatted: