Subject: Re: Building 3.0_BETA?
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Andy Ruhl <acruhl@gmail.com>
List: port-dreamcast
Date: 10/23/2005 12:41:03
On 7/31/05, Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> wrote:
> In article <78a2305a05073006481c030de8@mail.gmail.com>
> acruhl@gmail.com wrote:
>
> > Has anyone built from the netbsd-3 branch?
> >
> > I just tried this morning to cross build a dreamcast release on my
> > amd64 running 3.0_BETA, and it failed with this:
>  :
> > insn-emit.c -o insn-emit.o.tmp
> > insn-emit.c: In function `gen_mshfhi_l_di':
> > insn-emit.c:5039: warning: integer constant is too large for "long" typ=
e
> > insn-emit.c: In function `gen_mshflo_l_di':
> > insn-emit.c:5057: warning: this decimal constant is unsigned only in IS=
O C90
>
> autobuild on releng seems to have no problem:
> http://releng.netbsd.org/builds/netbsd-3/200507250000Z/
> but insn-emit.c is a generated file on the host, so maybe
> few people tried built on 64bit hosts and sh.md might have
> LP64 problem. Could you show the lines which cause the warnings?
> How about this diff taken from gcc cvsweb?
> ---
>
> Index: gnu/dist/gcc/gcc/config/sh/sh.md
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/src/gnu/dist/gcc/gcc/config/sh/sh.md,v
> retrieving revision 1.2
> diff -u -r1.2 sh.md
> --- gnu/dist/gcc/gcc/config/sh/sh.md    29 May 2004 00:49:15 -0000      1=
.2
> +++ gnu/dist/gcc/gcc/config/sh/sh.md    31 Jul 2005 11:39:54 -0000
> @@ -1981,7 +1981,7 @@
>    [(const_int 0)]
>    "
>  {
> -  if (INTVAL (operands[2]) =3D=3D (unsigned) 0xffffffff)
> +  if ((unsigned)INTVAL (operands[2]) =3D=3D (unsigned) 0xffffffff)
>      emit_insn (gen_mshflo_l_di (operands[0], operands[1], CONST0_RTX (DI=
mode)));
>    else
>      emit_insn (gen_mshfhi_l_di (operands[0], CONST0_RTX (DImode), operan=
ds[1]));
>
> ---
> Izumi Tsutsui

The patch applied, but it seems to not have worked:

#   compile  backend/insn-emit.o
/usr/tools-dreamcast-r3/bin/shle--netbsdelf-gcc -O  -Werror    -I.
-I/usr/src/gnu/usr.bin/gcc3/backend/../arch/sh3el -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=20
-DTARGET_NAME=3D\"shle--netbsdelf\" -DLOCALEDIR=3D\"/usr/share/locale\"
-DNETBSD_NATIVE   -nostdinc -isystem
/usr/dest-dreamcast-r3/usr/include -c    insn-emit.c -o
insn-emit.o.tmp
insn-emit.c: In function `gen_mshfhi_l_di':
insn-emit.c:5039: warning: integer constant is too large for "long" type
insn-emit.c: In function `gen_mshflo_l_di':
insn-emit.c:5057: warning: this decimal constant is unsigned only in ISO C9=
0

*** Failed target:  insn-emit.o
*** Failed command: /usr/tools-dreamcast-r3/bin/shle--netbsdelf-gcc -O
-Werror -I. -I/usr/src/gnu/usr.bin/gcc3/backend/../arch/sh3el -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
-DTARGET_NAME=3D\"shle--netbsdelf\" -DLOCALEDIR=3D\"/usr/share/locale\"
-DNETBSD_NATIVE -nostdinc -isystem /usr/dest-dreamcast-r3/usr/include
-c insn-emit.c -o insn-emit.o.tmp
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu/usr.bin/gcc3/backend

I cleaned everything out before I rebuilt too.

Oh well. I can say it builds on i386 and the dreamcast boots.

Andy