Subject: Re: Confused about *mk
To: Sean Hafeez <sah.list@gmail.com>
From: Erik E. Fair <fair@netbsd.org>
List: port-sparc
Date: 10/08/2004 17:03:05
For -current, what you want in /etc/mk.conf is:

CPUFLAGS= -mcpu=supersparc -mtune=supersparc

This was added precisely to address your concern. For 1.6.* and 
earlier, if you dig into the guts of /usr/share/mk/* you find the 
variable that sets system-wide optimization, called "DBG", so:

DBG= -pipe -O2 -mcpu=supersparc -mtune=supersparc

I use "-pipe" because my build systems have lots of RAM, relatively 
speaking. If you can't afford to have the compiler and assembler and 
linker all in RAM at the same time, don't use it.

Overriding CFLAGS in /etc/mk.conf is bad; it will stomp on other things.

Note that for gcc 2.95.3 there is a "supersparc" machine description, 
but nothing different for "hypersparc". For gcc 3.x and later, 
"hypersparc" is a separate CPU description, hopefully optimizing a 
bit better for that CPU.

	Erik <fair@netbsd.org>