Subject: Recap on PR 29689
To: None <port-sparc64@NetBSD.org>
From: segv <segv@netctl.net>
List: port-sparc64
Date: 08/18/2005 00:48:57
Hi, I've jost posted a reply to PR 29689
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=29689

It contains a patch for binutils, which seems to fix that PR
The problem was, when adding '-mcpu=ultrasparc' compiler flag, it would fail
with:

Error: Illegal operands: There are only 32 single precision f registers; [0-31]

The reason why I wanted to compile with '-mcpu=ultrasparc' is because gcc can
potentially produce executables that are twice as fast for UltraSparc CPUs,
especially if you're bulding 32-bit sparc port, to run on UltraSparc machine

See http://www.osnews.com/story.php?news_id=6136

Now to another problem
Currently I'm trying to build 32-bit kernel+userland with ultrasparc
optimisations. This causes compiler warnings when building
xsrc/xfree/xc/extras/Mesa/src/mesa/sparc/sparc.c

Does anyone know if the following warnings are harmless, and what would be the
best way to fix them, hack sparc.c file, or remove -Werror compiler flag?

#   compile  OSmesa/sparc.o
/opt/tools.sparc/bin/sparc--netbsdelf-gcc -O2  -Werror -mcpu=ultrasparc -Os
-pipe -fno-strict-aliasing
-I/opt/obj.sparc/destdir.sparc/usr/X11R6/include/X11
-I/opt/xsrc/xfree/xc/lib/GL/include  -I/opt/xsrc/xfree/xc/extras/Mesa/include
-I/opt/xsrc/xfree/xc/extras/Mesa/src/mesa
-I/opt/xsrc/xfree/xc/extras/Mesa/src/mesa/main
-I/opt/xsrc/xfree/xc/extras/Mesa/src/mesa/glapi
-I/opt/xsrc/xfree/xc/extras/Mesa/src/mesa/shader  -DXTHREADS -D_REENTRANT
-DXUSE_MTSAFE_API  -DXNO_MTSAFE_PWDAPI -DMITMISC -DXTEST -DXTRAP -DXSYNC
-DXCMISC -DXRECORD  -DMITSHM -DBIGREQS -DXF86MISC -DDBE -DDPMSExtension  -DEVI
-DSCREENSAVER -DXV -DXVMC -DGLXEXT  -DGLX_USE_MESA -DFONTCACHE -DRES  -DGLXEXT
-DGLX_USE_MESA -DUSE_SPARC_ASM -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO
-I/opt/obj.sparc/destdir.sparc/usr/X11R6/include   -nostdinc
-isystem /opt/obj.sparc/destdir.sparc/usr/include
-c    /opt/xsrc/xfree/xc/extras/Mesa/src/mesa/sparc/sparc.c -o
sparc.o.tmp /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 1 error