Subject: Re: building -current, CPU optimizations, and the 'sh' problem.
To: Rui Paulo <rpaulo@fnop.net>
From: John D. Baker <jdbaker@mylinuxisp.com>
List: port-sparc
Date: 10/14/2005 17:15:47
On Fri, 14 Oct 2005, Rui Paulo wrote:

> -mcpu=supersparc and -mcpu=v8 are very similar. I wonder if they
>  produce any significant change in the code.

According to the gcc manual, 'v8' is generic across the SPARCv8
architecture, enabling only the strict SPARCv8 instruction set and
"default" (whatever that means) instruction scheduling parameters.

'supersparc' and 'hypersparc' are implementation-specific refinements.
(Additional instructions?  Operand sizes?  Definitely implemenation-
specific instruction scheduling.)

Re-reading the mailing-list archives, I saw a recommendation to just
use 'v8' on SS4/5 (microSPARC-II, MB86904).  This is what I'd originally
built with and built a complete userland, but was never able to build
the release sets.

As for the 'sh' issue, re-reading yet again shows I missed something.
The apparent solution (workaround) is to build 'sh' with

    -mcpu=v8 -mtune=supersparc

This would enforce a strict SPARCv8 instruction set, but permit supersparc
instruction scheduling, etc.  Since microSPARC-II is not superscalar, I'm
not sure what the effect would be.

Building 'sh' with -mcpu=supersparc only causes Bus Errors, building
with -mcpu=v8 only causes Segmentation Faults.  When I'm next able, I'll
rebuild 'sh' with the complete solution.  In the meantime, I moved
/bin/sh aside and hardlinked /bin/ksh as /bin/sh


> 20040516:
>         The end-user modifiable X11 configuration has been moved
>         from /usr/X11R6/lib/X11/<dir> to /etc/X11/<dir>.
>         Ensure that src and xsrc is up to date, and run
>         "make cleandir" in src/x11 before your next build.

This was the first time I'd ever built X11, so everything was clean and
up to date to begin with.

>         postinstall currently doesn't migrate the files from
>         /usr/X11R6/lib/X11/* to /etc/X11/* although it does
>         detect that this needs to occur, so you'll have to
>         manually move these files yourself.

What was odd was that the only files in /usr/X11R6/lib/X11/<dir> were
those left over from a clean install of 2.0G a long time ago.  No new
files were built or installed there for -current so when I nuked the
old /usr/X11R6 there was nothing that could be migrated.  Instead, I
found the new files in .../etc/X11 in the DESTDIR I specified with the
-D option to build.sh.

> Do you know the ammount of CPU cache both systems have?

mainbus0 (root): SUNW,SPARCstation-5: hostid 807a1b43
cpu0 at mainbus0: MB86904 @ 110 MHz, on-chip FPU
cpu0: 16K instruction (32 b/l), 8K data (16 b/l): cache enabled

I don't have access to the SS20/2xHS150 cache info right now.

-- 
John D. Baker, KN5UKS                    NetBSD     Darwin/MacOS X
jdbaker(at)mylinuxisp(dot)com                 OpenBSD            FreeBSD
BSD -- It just sits there and _works_!