Subject: Re: -mcpu=ultrasparc problems
To: Takeshi Nakayama <tn@catvmics.ne.jp>
From: Eduardo Horvath <eeh@netbsd.org>
List: port-sparc64
Date: 02/27/2006 16:52:08
On Mon, 27 Feb 2006, Takeshi Nakayama wrote:

> >>> segv@netctl.net wrote
> 
> > Hi, I'm trying to build 32-bit sparc port of NetBSD-current to run on sun4u
> > platform. Setting  COPTS+=-mcpu=ultrasparc results in the following error:
> > 
> > --- sparc.o ---
> > /opt/xsrc/xfree/xc/extras/Mesa/src/mesa/sparc/sparc.c: In function
> > `_mesa_init_sparc_glapi_relocs':
> > /opt/xsrc/xfree/xc/extras/Mesa/src/mesa/sparc/sparc.c:167: warning: right shift
> > count >= width of type
> > /opt/xsrc/xfree/xc/extras/Mesa/src/mesa/sparc/sparc.c:170: warning: right shift
> > count >= width of type
> > *** [sparc.o] Error code 1
> > 
> > Shall I file a PR, or can anyone think of a quick patch to fix this?
> 
> If there is __sparc_v9__ macro in this file, change it to
> __sparc64__ or something else.
> __sparc_v9__ means that use SPARC V9 instructions, not 64-bit
> environment.

Er... no.  __sparc_v9__ indicates the instruction set.  __arch64__ is the 
bit-width.

Eduardo