Subject: those kern_synch.c coredumps
To: None <port-sun3@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sun3
Date: 07/19/1996 20:18:01
This is very odd.

A few of you may recall that a while ago I posted a note that when
building a sun3 kernel on a sun3, the compiler was crashing on
kern_synch.c.  Well, buoyed up by comments from three or four people
who claimed to have been compiling sun3 kernels on sun3 machines just
fine, I pushed the envelope.  I wasn't quite doing a stock build, for
various reasons; I started approaching a stock system, trying to figure
out what was critical.

Some time ago I removed the -O2 in sys/arch/sun3/conf/Makefile.sun3
because some file or other broke with it turned on.  I left it turned
off in my patch tree, and that seems to be what's breaking things - at
any rate, when I stuck it back in, the compiler no longer bugchecked.

For what it's worth, it seems to be optimization on the cc1 pass that
matters.  I tried keeping .i files to play with optimization at the
preprocessor stage versus the compiler stage, and it bugchecks exactly
when the cc1 run is not told to optimize, regardless of which
preprocessor output I feed it.

Should I send-pr this?  Surely this isn't how it's supposed to work.
(This is totally bizarre.  This is the first time I've ever seen
something break when the optimizer is turned _off_.)

Someday I may build a cc1 with -g and see what's happening, but don't
hold your collective breath. :-/

					der Mouse
		    01 EE 31 F6 BB 0C 34 36  00 F3 7C 5A C1 A0 67 1D