Subject: Re: -msupersparc not cool for 1.5 kernel on SS20?
To: Greg Troxel <gdt@ir.bbn.com>
From: Jon Buller <jon@bullers.net>
List: port-sparc
Date: 11/15/2002 07:33:19
In message <rmismy227g6.fsf@fnord.ir.bbn.com>, Greg Troxel writes:
>summary: I built a 1.5 kernel with -msupersparc for an SS20, and it
>failed to boot.  Is this a bug, or is the answer "Don't do this"
>because the kernel environment is somehow special?

> [stuff deleted...]

>The new kernel seems bigger, and I don't know why.  I am rebuilding a
>kernel without cpuflags and will try that.

The kernel is too big, and it clobbers the loader while loading.
I ran into this a lot too and never figured it out, but someone
mentioned on the list that CFLAGS is set conditionally in the kernel
makefile and putting CFLAGS in mk.conf means the kernel makefile
does not set it's flags too.

The important one is -O2, as that keeps the code size from doubling.
The simple thing to do is add -O2 to your CFLAGS in mk.conf.  When
building userland, the compiler will now get a pair of -O2 flags, but
the kernel compiles will get one, making up for the makefile botch.

I'm pretty sure this is fixed in -current, and I think on the 1.6
branch too.

Jon