Subject: Re: setting COPTS+=-mcpu=ultrasparc breaks build
To: None <sigsegv@rambler.ru>
From: Eduardo Horvath <eeh@NetBSD.org>
List: port-sparc64
Date: 03/14/2005 17:16:00
On Sun, Mar 13, 2005 at 02:02:21PM +0000, sigsegv@rambler.ru wrote:
> Greetings, I set COPTS+=-mcpu=ultrasparc in my mk.conf and then 
> attempted to build release from CURRENT source tree.
> 
> cd /opt/src && ./build.sh -j 1 -u -m sparc64 -x -X /opt/xsrc \
>         -O /opt/obj.sparc64 -T /opt/tools.sparc64 \
>         release 2>&1 | tee /scripts/log.sparc64
> 
> It failed when building src/lib/libm/src/e_pow.c
> Looking at the error message, it seems to complain about floating point 
> registers or something. Is this a bug?
> 
> 
> #   compile  libm/e_pow.o
> /opt/tools.sparc64/bin/sparc64--netbsd-gcc -O2 -Wall -Wstrict-prototypes 
> -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional 
> -Wno-uninitialized  -Werror  -mcpu=ultrasparc -Os -pipe   -D_MULTI_LIBM 
> -D_POSIX_MODE -DLIBM_SCCS   -nostdinc -isystem 
> /opt/obj.sparc64/destdir.sparc64/usr/include -c 
> /opt/src/lib/libm/src/e_pow.c -o e_pow.o.tmp
> {standard input}: Assembler messages:
> {standard input}:316: Error: Illegal operands: There are only 32 single 
> precision f registers; [0-31]

It's difficult to tell w/o gcc's asm output, but from the errors it
sounds like gcc is generating assembly code with an illegal register 
specifier.  So yes, it does appear to be a bug.

Eduardo