Subject: building -current, CPU optimizations, and the 'sh' problem.
To: None <port-sparc@NetBSD.org>
From: John D. Baker <jdbaker@mylinuxisp.com>
List: port-sparc
Date: 10/14/2005 12:11:24
My SS5-110 system finished building a complete release set a couple of
days ago, including X11.  These were from -current last updated around
7 October.  They were built with '-mcpu=supersparc' which is the cpu
flag indicated by pkgsrc/devel/cpuflags for the Fujitsu MB86904.  (Can
someone point me to documentation for why this is appropriate rather
than the generic 'v8'?  The SPARC v8 manual doesn't mention this part
and the SUN STP1012 manual is very vague.)

My procedure was:

    build tools and kernel (I just went ahead with custom-tailored one.)
    reboot with new kernel
    build
    install=/
    reboot with new userland
    release

The layout of an installation must have changed between 2.x and 3.x
(or between netbsd-3 and -current).  The X11 config files seem to be
exclusively in /etc/X11 rather than symlinked from /usr/X11R6/lib/X11.
This caused postinstall to fail the x11 update because /etc/X11/*
existed concurrently with corresponding /usr/X11R6/lib/X11/* files.
It appears these were left over from my previous 2.99.10 (or earlier)
installation.

So, I simply nuked /usr/X11R6 and /etc/X11/* before doing the install.
This mostly worked, except the new /etc/X11/* directories were created
but not populated.  This was simple enough to fix, copying them (with
tar) from my defined DEST directory.


So far, so good.  I've recently set about building extras from pkgsrc
and have started running into the problems with 'sh'.  In my case, it
elicits Bus Error and dumps core, usually after the install phase of
a package dependency, but I soon hit a showstopper where it failed
in the middle of the build step.

Recalling the discussion in the archives, I've rebuilt just /bin/sh with
the generic "-mcpu=v8" option and installed it.  I'm now starting my
package builds over.  The early indications looked good, but now I'm
getting Segmentation Fault from sh.

For comparison, on my dual HS150 SS20 where everything was built with
-mcpu=hypersparc, I haven't had any problems so far.

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