Subject: Re: gcc 3 on m68k?
To: John Klos <john@sixgirls.org>
From: Gunther Nikl <gni@gecko.de>
List: port-amiga
Date: 07/22/2003 09:54:35
On Mon, Jul 21, 2003 at 06:16:40PM -0400, John Klos wrote:
> Has anyone successfully built gcc 3 on m68k?

  I have built several GCC 3 version for a m68k target and the resulting
  compiler(s) work. Currently I am using 3.3 on AmigaOS/68k.

> /tmp/pkgsrc/lang/gcc3/work.lilith/gcc-3.3/gcc/xgcc
> -B/tmp/pkgsrc/lang/gcc3/work.lilith/gcc-3.3/gcc/
> -B/usr/pkg/gcc-3.3/m68k--netbsdelf/bin/
> -B/usr/pkg/gcc-3.3/m68k--netbsdelf/lib/ -isystem
> /usr/pkg/gcc-3.3/m68k--netbsdelf/include -O2  -DIN_GCC    -W -Wall
> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
> ./include   -fPIC -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I.
> -I./. -I./config -I./../include  -DL_divdi3 -c ./libgcc2.c -fexceptions
> -fnon-call-exceptions -o libgcc/./_divdi3.o
> libgcc2.c: In function `__divdi3':
> libgcc2.c:757: error: unable to find a register to spill in class
> `DATA_REGS'
> libgcc2.c:757: error: this is the insn:
> (insn 165 164 167 15 0x8294ae0 (set (reg/v:SI 6 %d6 [74])
>         (mult:SI (reg/v:SI 8 %a0 [70])
>             (reg/v:SI 10 %a2 [69]))) 140 {*m68k.md:3072} (insn_list 160
> (insn_list 164 (nil)))
>     (nil))
> libgcc2.c:757: confused by earlier errors, bailing out
> gmake[2]: *** [libgcc/./_divdi3.o] Error 1

  I compiled libgcc.a always without any problems but then AmigaOS/68k has
  its own "pic" mode.
  Hm, I wonder whether building GCC in the source dir really works (but that
  shouldn't make a difference in this case).

  Gunther